<?php //just for testing purposes $sunday11am = strtotime("2016-02-07 11:00:00"); //sunday 11am $sunday11pm = strtotime("2016-02-07 23:00:00"); //sunday 11pm //test with sunday morning $next = (date('N', $sunday11am) == '7' && date('h', $sunday11am) < 22 ? 'this' : 'next'); echo "Sunday Morning: ". date('F jS', strtotime("$next Sunday", $sunday11am)) ."\n"; $next = (date('N', $sunday11pm) == '7' && date('h', $sunday11pm) < 22 ? 'this' : 'next'); echo "Sunday Evening: ". date('F jS', strtotime("$next Sunday")) ."\n";
You have javascript disabled. You will not be able to edit any code.