I need to return the date of the next Sunday after a certain cut-off point. For example, I launch a site for competitions, and a slice is 10 pm per week every week, so if a user views the website after 10 pm on Sunday, he would need to display the next week.
I am currently using this:
date('F jS', strtotime('this Sunday', strtotime(date('F jS', time()))));
It's great, but it only works after midnight, so it will only display the next Sunday at 00:00 on Monday, when I need it at 22:00 on Sunday.
Any help is much appreciated!
source
share