I am making a function to calculate all the public holidays here in Canada with a gived Year. One on these public holidays is the Labour Day. It is the First Monday of the month of September. I just don't know to calculate it!
Someone can help me with that?
Calculate public holidays
Moderator: General Moderators
-
matthiasone
- Forum Contributor
- Posts: 117
- Joined: Mon Jul 22, 2002 12:14 pm
- Location: Texas, USA
- Contact:
here is one way
Code: Select all
$year = '2003';
$sdate = strtotime("9/1/$year");
echo date('F j, Y', strtotime('next monday',$sdate));