Here's what i came up with.
function endofweek(){
$thisdate = date('Y-m-d');
$dayofweek = date('w', strtotime($thisdate));
$sunday = date('Y-m-d', strtotime("-$dayofweek days"));
return $sunday;
}
Leave a comment if you find this useful. :)
I work for e Boat Loans. A very cool company and every once in a while I'll post about what I do for eBoat Loans here.
$thisdate = date('Y-m-d');
$dayofweek = date('w', strtotime($thisdate));
$sunday = date('Y-m-d', strtotime("-$dayofweek days"));
return $sunday;
No comments:
Post a Comment