Hi all. If I have a date like this "04/24/2008", how do I return the Sunday and Saturday date of that week which should be 4/20/2008 and 4/26/2008?
Untested:
$date = "04/24/2008"; $datetime = strtotime($date); $sunday = date('m/d/Y', strtotime('last sunday', strtotime('tomorrow', $datetime))); $saturday = date('m/d/Y', strtotime('next saturday', strtotime('yesterday', $datetime)));