I would like to find the date stamp of monday, tuesday, wednesday, etc. If that day hasn't come this week yet, I would like the date to be this week, else, next week. Thanks!
See strtotime()
strtotime()
strtotime('next tuesday');
You could probably find out if you have gone past that day by looking at the week number:
$nextTuesday = strtotime('next tuesday'); $weekNo = date('W'); $weekNoNextTuesday = date('W', $nextTuesday); if ($weekNoNextTuesday != $weekNo) { //past tuesday }
2.1m questions
2.1m answers
60 comments
56.9k users