I hope that you may have a hint for me, how I can solve this issue. I am showing to my customers some kind of a ranking list. The data within the ranking list are really important and the ranking list counts all selected points from tuesday for 2 weeks until monday last week. Everything is working so far, except when today is tuesday, because with my function, the program shows on tuesday the ranking list for the last two weeks except from last week.
Here is my code I am using:
$start_date_week=strtotime('-2 week tuesday 00:00:00');
$end_date_week=strtotime('-1 week monday 23:59:59');
So if today is tuesday, my program shows me the data from the last 2 weeks. On every other day it shows the data from last week correct. Any idea how I can make this work, even if today is tuesday?
With those 2 variables I am getting my data from the database and those two variabes also show the date from until the date to:
.date("d.m.Y", $start_date_week)." - ".date("d.m.Y", $end_date_week)."
Please let me know how I can solve this issue.
Thanks, Chris