Code | Output |
date('m-d-Y',strtotime('now')) | 10-17-2025 |
date('m-d-Y',strtotime('11 July 2016')) | 07-11-2016 |
date('m-d-Y',strtotime('+1 day')) | 10-18-2025 |
date('m-d-Y',strtotime('+1 week')) | 10-24-2025 |
date('m-d-Y',strtotime('+1 month')) | 11-17-2025 |
date('m-d-Y',strtotime('+1 month 3 days')) | 11-20-2025 |
date('m-d-Y',strtotime('+2 months -1 day')) | 12-16-2025 |
date('m-d-Y',strtotime('Wednesday')) | 10-22-2025 |
date('m-d-Y',strtotime('Sunday +1 day')) | 10-20-2025 |
date('m-d-Y',strtotime('first day of this month')) | 10-01-2025 |
date('m-d-Y',strtotime('last day of this month')) | 10-31-2025 |
date('m-d-Y',strtotime('first day of next month')) | 11-01-2025 |
date('m-d-Y',strtotime('last day of next month')) | 11-30-2025 |
date('m-d-Y',strtotime('first day of previous month')) | 09-01-2025 |
date('m-d-Y',strtotime('last day of previous month')) | 09-30-2025 |
date('m-d-Y',strtotime('+5 years ')) | 10-17-2030 |
With Date & Time | |
date('m-d-Y H:i:s',strtotime('+1 hour ')) | 10-17-2025 20:59:39 |
date('m-d-Y H:i:s',strtotime('+10 minutes ')) | 10-17-2025 20:09:39 |
date('m-d-Y H:i:s',strtotime('+20 seconds ')) | 10-17-2025 19:59:59 |
date('m-d-Y',strtotime('last day of next month +1 Hour')) | 11-30-2025 : 20 |
date('m-d-Y',strtotime('first day of next month +1 Hour 20 minutes')) | 11-01-2025 : 21 : 19 : 39 |
Fixed Date | |
date('m-d-Y',strtotime('25-12-2012 +5 years ')) | 12-25-2017 |
date('m-d-Y',strtotime('25-12-2012 +1 month 1 week ')) | 02-01-2013 |
date('m-d-Y',strtotime('12-06-2018 next Monday ')) | 06-18-2018 |
date('d-M-Y',strtotime('07-06-2018 next Wednesday')) | 13-Jun-2018 |