I'm trying to figure out how to calculate the date of the end of the week (saturday) based on the current date. For example, if the current date is 05-23-2002 (gmDate('m-d-Y')) getting the a result of 05-24-2002.
Any ideas?
Need help with some date logic...
Moderator: General Moderators
Code: Select all
<?php $date = getdate();
$date = date('Y-m-d', mktime(0, 0, 0, $dateї'mon'], $dateї'mday']+(6-$dateї'wday']), $dateї'year']));
print($date);
?>Thanks a lot.
I appreciate the help.