I want to use strtotime("last Monday").
strtotime("last Monday")
The thing is, if today IS MONDAY, what does it return? It seems to be returning the date for the monday of last week. How can I make it return today's date in that case?
How can I make it return today's date in that case?
pseudocode:
if (today == monday) return today; else return strtotime(...);
Btw, this trick also could work:
strtotime('last monday', strtotime('tomorrow'));
1.4m articles
1.4m replys
5 comments
56.9k users