Jump to content

Repeat holiday every year


deib97

Recommended Posts


$d1 = new DateTime('2013-12-25');
$dp = new DatePeriod($d1, new DateInterval('P1Y'), 7);

foreach ($dp as $dt) {
echo $dt->format('jS F Y') . '<br>';
}

/* OUTPUT *****
25th December 2013
25th December 2014
25th December 2015
25th December 2016
25th December 2017
25th December 2018
25th December 2019
25th December 2020
*/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.