comment obtenir la date pour des vacances à l'aide de php

Par exemple:

  1. 3ème lundi de janvier pour Martin Luther King Day
  2. 3ème lundi de février pour Presidents' Day (Washington Anniversaire)
  3. Dernier dimanche de Mars pour de Pâques
  4. Dernier lundi du mois de Mai pour Journée de commémoration de l'

Je suis en train d'essayer d'obtenir ces dates, afin que je puisse marquer sur mon calendrier sans manuellement en mettant tout pour les années à venir.


MODIFIÉ RÉPONSE!!

$curYir = date("Y");//current year

$MLK = date('Y-m-d', strtotime("january $curYir third monday")); //marthin luthor king day
$PD = date('Y-m-d', strtotime("february $curYir third monday")); //presidents day
$Est =  date('Y-m-d', easter_date($curYir))); //easter 
$MDay = date('Y-m-d', strtotime("may $curYir first monday")); //memorial day
//("may $curYir last monday") will give you the last monday of may 1967
//much better to determine it by a loop
      $eMDay = explode("-",$MDay);
      $year = $eMDay[0];
      $month = $eMDay[1];
      $day = $eMDay[2];

      while($day <= 31){
          $day = $day + 7;
      }
      if($day > 31)
      $day = $day - 7;

      $MDay = $year.'-'.$month.'-'.$day;
$LD = date('Y-m-d', strtotime("september $curYir first monday"));  //labor day
$CD = date('Y-m-d', strtotime("october $curYir third monday")); //columbus day
$TH = date('Y-m-d', strtotime("november $curYir first thursday")); //thanks giving 
//("november $curYir last thursday") will give you the last thursday of november 1967
//much better to determine it by a loop
      $eTH = explode("-",$TH);
      $year = $eTH[0];
      $month = $eTH[1];
      $day = $eTH[2];

      while($day <= 30){
          $day = $day + 7;
      }
      if($day > 30)
      //watch out for the days in the month November only have 30
      $day = $day - 7;

      $TH = $year.'-'.$month.'-'.$day;
InformationsquelleAutor telexper | 2013-02-16