3

holidaysfr

holidays_fr
SYNOPSIS

holidays_fr($year=false)

DESCRIPTION

holidays_fr returns the list of holidays in France for the year $year or the current year by default.

CODE
  1. function holidays_fr($year=false) {
  2.     if (!$year) {
  3.         $year = intval(date('Y'));
  4.     }
  5.  
  6.     $easter = mktime(0, 0, 0, 3, 21 + easter_days($year), $year);
  7.     $easterday = date('j', $easter);
  8.     $eastermonth = date('n', $easter);
  9.     $easteryear = date('Y', $easter);
  10.  
  11.     $holidays = array(
  12.         mktime(0, 0, 0,  1,  1, $year), // New Year's Day
  13.         mktime(0, 0, 0,  5,  1, $year), // Labor Day
  14.         mktime(0, 0, 0,  5,  8, $year), // Victory Day
  15.         mktime(0, 0, 0,  7, 14, $year), // Bastille Day
  16.         mktime(0, 0, 0,  8, 15, $year), // Assumption of Mary
  17.         mktime(0, 0, 0, 11,  1, $year), // All Saints' Day
  18.         mktime(0, 0, 0, 11, 11, $year), // Armistice Day
  19.         mktime(0, 0, 0, 12, 25, $year), // Christmas Day
  20.  
  21.         mktime(0, 0, 0, $eastermonth, $easterday + 1,  $easteryear),    // Easter Monday
  22.         mktime(0, 0, 0, $eastermonth, $easterday + 39, $easteryear),    // Ascension Thursday
  23.         mktime(0, 0, 0, $eastermonth, $easterday + 50, $easteryear),    // Pentecost Monday
  24.     );
  25.  
  26.     sort($holidays);
  27.  
  28.     return $holidays;
  29. }
SEE ALSO

holidays_us

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].