@@ 21-51 (lines=31) @@ | ||
18 | * @author Antiques Promotion (http://www.antiquespromotion.ca) |
|
19 | */ |
|
20 | ||
21 | if (!function_exists('easter')) { |
|
22 | /** |
|
23 | * @param $y |
|
24 | * @param $holidays |
|
25 | */ |
|
26 | function easter($y, &$holidays) |
|
27 | { |
|
28 | $e = 21 + easter_days($y); |
|
29 | if ($e > 31) { |
|
30 | $e -= 31; |
|
31 | $em = 4; |
|
32 | } else { |
|
33 | $em = 3; |
|
34 | } |
|
35 | $f = $e - 2; |
|
36 | $m = $e + 1; |
|
37 | if ($f > 0) { |
|
38 | $holidays["$y-$em-$f"] = 'Vendredi Saint'; |
|
39 | } else { |
|
40 | $f = 31 - $f; |
|
41 | $holidays["$y-3-$f"] = 'Vendredi Saint'; |
|
42 | } |
|
43 | $holidays["$y-$em-$e"] = 'Pâques'; |
|
44 | if ($m > 31) { |
|
45 | $m -= 31; |
|
46 | $holidays["$y-4-$m"] = 'Lundi de Pâques'; |
|
47 | } else { |
|
48 | $holidays["$y-$em-$m"] = 'Lundi de Pâques'; |
|
49 | } |
|
50 | } |
|
51 | } |
|
52 | ||
53 | $this->holidays = array(); |
|
54 | $start = (int)date('Y') - 10; |
@@ 21-51 (lines=31) @@ | ||
18 | * @author Antiques Promotion (http://www.antiquespromotion.ca) |
|
19 | */ |
|
20 | ||
21 | if (!function_exists('easter')) { |
|
22 | /** |
|
23 | * @param $y |
|
24 | * @param $holidays |
|
25 | */ |
|
26 | function easter($y, &$holidays) |
|
27 | { |
|
28 | $e = 21 + easter_days($y); |
|
29 | if ($e > 31) { |
|
30 | $e -= 31; |
|
31 | $em = 4; |
|
32 | } else { |
|
33 | $em = 3; |
|
34 | } |
|
35 | $f = $e - 2; |
|
36 | $m = $e + 1; |
|
37 | if ($f > 0) { |
|
38 | $holidays["$y-$em-$f"] = 'Good Friday'; |
|
39 | } else { |
|
40 | $f = 31 - $f; |
|
41 | $holidays["$y-3-$f"] = 'Good Friday'; |
|
42 | } |
|
43 | $holidays["$y-$em-$e"] = 'Easter'; |
|
44 | if ($m > 31) { |
|
45 | $m -= 31; |
|
46 | $holidays["$y-4-$m"] = 'Easter Monday'; |
|
47 | } else { |
|
48 | $holidays["$y-$em-$m"] = 'Easter Monday'; |
|
49 | } |
|
50 | } |
|
51 | } |
|
52 | ||
53 | $this->holidays = array(); |
|
54 | $start = (int)date('Y') - 10; |
@@ 21-51 (lines=31) @@ | ||
18 | * @author Antiques Promotion (http://www.antiquespromotion.ca) |
|
19 | */ |
|
20 | ||
21 | if (!function_exists('easter')) { |
|
22 | /** |
|
23 | * @param $y |
|
24 | * @param $holidays |
|
25 | */ |
|
26 | function easter($y, &$holidays) |
|
27 | { |
|
28 | $e = 21 + easter_days($y); |
|
29 | if ($e > 31) { |
|
30 | $e -= 31; |
|
31 | $em = 4; |
|
32 | } else { |
|
33 | $em = 3; |
|
34 | } |
|
35 | $f = $e - 2; |
|
36 | $m = $e + 1; |
|
37 | if ($f > 0) { |
|
38 | $holidays["$y-$em-$f"] = 'Good Friday'; |
|
39 | } else { |
|
40 | $f = 31 - $f; |
|
41 | $holidays["$y-3-$f"] = 'Good Friday'; |
|
42 | } |
|
43 | $holidays["$y-$em-$e"] = 'Easter'; |
|
44 | if ($m > 31) { |
|
45 | $m -= 31; |
|
46 | $holidays["$y-4-$m"] = 'Easter Monday'; |
|
47 | } else { |
|
48 | $holidays["$y-$em-$m"] = 'Easter Monday'; |
|
49 | } |
|
50 | } |
|
51 | } |
|
52 | ||
53 | $this->holidays = array(); |
|
54 | $start = (int)date('Y') - 10; |