Skip to main content

Find next month and Year from today

This script prints out the dates of 1 month and 1 year ahead of today's date.

php code:

<?php
echo 'Next month: ';
echo date('Y',strtotime('+1 month')).'-'.date('m',strtotime('+1 month')).'-'.date('d',strtotime('+1 month'));
echo '<br>';

echo 'Next year: ';
$y = date("Y-m-d",strtotime("+1 years"));
echo $y;
?>

Comments