Todays date open index
Todays  week being and ending dates are set by PHP in the index file.  They are then applied to the form called today.  The Js button called open fautomatically clicks the button on the Today form to get  this week and next week dates

——

Week Beginning display dates
The conversion for the display dates is done in the script page

It sets  the two dates it receives into display date formats.   2nd January 2026 from 2026-01-02

It then applies them to the return Jason and then it applied in the each outside of the Clone section
———

Find to day or next week or prep weeks
The forms have a status value that is posted to the sql file.
Php checks it and applies the date  Plus or minus depending on the status value  then applies it to the
sql database search

E.g. if status = previous week  then apply minus  7 days to the $thisweek date posted
if status = next week  then apply plus  7 days to the $tnextweek date posted
———
Weekdate  variable, 
Json collects all dates and  then the dates are filtered by $grep in to week1 and week 2