locales/canada-fr.php
<?php
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* @copyright {@link http://xoops.org/ XOOPS Project}
* @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
* @package
* @since
* @author XOOPS Development Team,
* @author Antiques Promotion (http://www.antiquespromotion.ca)
*/
if (!function_exists('easter')) {
/**
* @param $y
* @param $holidays
*/
function easter($y, &$holidays)
{
$e = 21 + easter_days($y);
if ($e > 31) {
$e -= 31;
$em = 4;
} else {
$em = 3;
}
$f = $e - 2;
$m = $e + 1;
if ($f > 0) {
$holidays["$y-$em-$f"] = 'Vendredi Saint';
} else {
$f = 31 - $f;
$holidays["$y-3-$f"] = 'Vendredi Saint';
}
$holidays["$y-$em-$e"] = 'Pâques';
if ($m > 31) {
$m -= 31;
$holidays["$y-4-$m"] = 'Lundi de Pâques';
} else {
$holidays["$y-$em-$m"] = 'Lundi de Pâques';
}
}
}
$this->holidays = array();
$start = (int)date('Y') - 10;
$end = $start + 30;
for ($y = $start; $y < $end; ++$y) {
easter($y, $this->holidays);
$v = ((int)date('N', strtotime("$y-5-25")) == 1) ? '25' : date('j', strtotime('Last Monday', strtotime("$y-5-25")));
$m = date('j', strtotime('+2 Sunday', strtotime("$y-5-1")));
$f = date('j', strtotime('+3 Sunday', strtotime("$y-6-1")));
$c = date('j', strtotime('+1 Monday', strtotime("$y-8-1")));
$l = date('j', strtotime('+1 Monday', strtotime("$y-9-1")));
$t = date('j', strtotime('+2 Monday', strtotime("$y-10-1")));
$this->holidays["$y-1-1"] = 'Jour de l\'an';
$this->holidays["$y-2-14"] = 'St-Valentin';
$this->holidays["$y-3-17"] = 'St-Patrick';
$this->holidays["$y-4-22"] = 'Jour de la terre';
$this->holidays["$y-5-$m"] = 'Fête des mère';
$this->holidays["$y-5-$v"] = 'Fête de la reine';
$this->holidays["$y-6-$f"] = 'Fête des père';
$this->holidays["$y-6-24"] = 'St-Jean-Baptiste';
$this->holidays["$y-7-1"] = 'Fête du Canada';
$this->holidays["$y-8-$c"] = 'Congé provincial';
$this->holidays["$y-9-$l"] = 'Fête du travail';
$this->holidays["$y-10-$t"] = 'Action de grâce';
$this->holidays["$y-10-31"] = 'Halloween';
$this->holidays["$y-11-11"] = 'Jour du souvenir';
$this->holidays["$y-12-25"] = 'Noël';
$this->holidays["$y-12-26"] = 'Boxing Day';
}