How we can get previous week monday date and next week monday date by provided date.Eample: if $date = '2015-04-08' (y-m-d format). then function returns, previous monday date = 2015-03-30 and next monday date = 2015-04-13
echo "Next Monday:". date('Y-m-d', strtotime('next monday', strtotime($givenDate)));
echo "Previous Monday:". date('Y-m-d', strtotime('previous monday', strtotime($givenDate)));
you can use
date('Y-m-d', strtotime('last week Monday'));
date('Y-m-d', strtotime('next week Monday'));
or whatever you want http://php.net/manual/en/datetime.formats.relative.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With