Page 1 of 1

Calculate public holidays

Posted: Wed Oct 29, 2003 9:31 am
by richie256
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?

Posted: Wed Oct 29, 2003 10:06 am
by matthiasone
here is one way

Code: Select all

$year = '2003';
  $sdate = strtotime("9/1/$year");
  echo date('F j, Y', strtotime('next monday',$sdate));

Posted: Wed Oct 29, 2003 11:30 am
by richie256
thank you matthiasone

Does anybody have another way? to get this with math function?