1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| //Fêtes fixes
$dateList[$year."-01-01"]="Jour de l'an";
$dateList[$year."-05-01"]="Fête du travail";
$dateList[$year."-05-08"]="Armistice 39-45";
$dateList[$year."-07-14"]="Fête nationale";
$dateList[$year."-08-15"]="Assomption";
$dateList[$year."-11-01"]="Toussaint";
$dateList[$year."-11-11"]="Armistice 14-18";
$dateList[$year."-12-25"]="Noël";
////Vacances de Pâque
$debut = date_create($year. '-04-18');
$fin = date_create($year. '-04-30');
for ($date = clone $debut; $date <= $fin; $date->modify('+1 day')) {
if ($date->format('N') < 6) {
$dateList[$date->format('Y-m-d')] = 'vacances de Printemps 2016';
}
}
//Retourne le résultat
return $dateList;
}
}
////Vacances de d'étè
$debut = date_create($year. '-07-06');
$fin = date_create($year. '-07-29');
for ($date = clone $debut; $date <= $fin; $date->modify('+1 day')) {
if ($date->format('N') < 6) {
$dateList[$date->format('Y-m-d')] = 'vacances';
}
}
//Retourne le résultat
return $dateList;
}
} |