PHP Obtenir les jours fériés par code

<?php

date_default_timezone_set('Europe/Paris');

function get_jours_feries($year = null) {

    if ($year === null)
         $year = intval(date('Y'));
     
    $easterDate  = easter_date($year);
    $easterDay   = date('j', $easterDate);
    $easterMonth = date('n', $easterDate);
    $easterYear   = date('Y', $easterDate);

    $dates = array(

        // These days have a fixed date
        mktime(0, 0, 0, 1,  1,  $year),  // 1er janvier

        mktime(0, 0, 0, 5,  1,  $year),  // Fête du travail
        mktime(0, 0, 0, 5,  8,  $year),  // Victoire des alliés

        mktime(0, 0, 0, 7,  14, $year),  // Fête nationale
        mktime(0, 0, 0, 8,  15, $year),  // Assomption
        mktime(0, 0, 0, 11, 1,  $year),  // Toussaint
        mktime(0, 0, 0, 11, 11, $year),  // Armistice
        mktime(0, 0, 0, 12, 25, $year),  // Noel

        // These days have a date depending on easter
        mktime(0, 0, 0, $easterMonth, $easterDay + 1,  $easterYear), // Lundi de Pâques

        mktime(0, 0, 0, $easterMonth, $easterDay + 39, $easterYear), // Jeudi de l'Ascension
        mktime(0, 0, 0, $easterMonth, $easterDay + 50, $easterYear), // Lundi de Pentecôte
    );

    // sort dates
    sort($dates);

    // formatting dates
    $dates = array_map(function($time) { return date('Y-m-d', $time); }, $dates);

    return $dates;
}

// output
for ($i = date('Y'); $i <= (date('Y') + 10) ; $i++)
    echo implode("\n", get_jours_feries($i) ), "\n";

Source