@@ 57-82 (lines=26) @@ | ||
54 | $start = (int)date('Y') - 10; |
|
55 | $end = $start + 30; |
|
56 | ||
57 | for ($y = $start; $y < $end; ++$y) { |
|
58 | easter($y, $this->holidays); |
|
59 | $v = ((int)date('N', strtotime("$y-5-25")) == 1) ? '25' : date('j', strtotime('Last Monday', strtotime("$y-5-25"))); |
|
60 | $m = date('j', strtotime('+2 Sunday', strtotime("$y-5-1"))); |
|
61 | $f = date('j', strtotime('+3 Sunday', strtotime("$y-6-1"))); |
|
62 | $c = date('j', strtotime('+1 Monday', strtotime("$y-8-1"))); |
|
63 | $l = date('j', strtotime('+1 Monday', strtotime("$y-9-1"))); |
|
64 | $t = date('j', strtotime('+2 Monday', strtotime("$y-10-1"))); |
|
65 | ||
66 | $this->holidays["$y-1-1"] = 'Jour de l\'an'; |
|
67 | $this->holidays["$y-2-14"] = 'St-Valentin'; |
|
68 | $this->holidays["$y-3-17"] = 'St-Patrick'; |
|
69 | $this->holidays["$y-4-22"] = 'Jour de la terre'; |
|
70 | $this->holidays["$y-5-$m"] = 'Fête des mère'; |
|
71 | $this->holidays["$y-5-$v"] = 'Fête de la reine'; |
|
72 | $this->holidays["$y-6-$f"] = 'Fête des père'; |
|
73 | $this->holidays["$y-6-24"] = 'St-Jean-Baptiste'; |
|
74 | $this->holidays["$y-7-1"] = 'Fête du Canada'; |
|
75 | $this->holidays["$y-8-$c"] = 'Congé provincial'; |
|
76 | $this->holidays["$y-9-$l"] = 'Fête du travail'; |
|
77 | $this->holidays["$y-10-$t"] = 'Action de grâce'; |
|
78 | $this->holidays["$y-10-31"] = 'Halloween'; |
|
79 | $this->holidays["$y-11-11"] = 'Jour du souvenir'; |
|
80 | $this->holidays["$y-12-25"] = 'Noël'; |
|
81 | $this->holidays["$y-12-26"] = 'Boxing Day'; |
|
82 | } |
|
83 |
@@ 57-81 (lines=25) @@ | ||
54 | $start = (int)date('Y') - 10; |
|
55 | $end = $start + 30; |
|
56 | ||
57 | for ($y = $start; $y < $end; ++$y) { |
|
58 | easter($y, $this->holidays); |
|
59 | $v = ((int)date('N', strtotime("$y-5-25")) == 1) ? '25' : date('j', strtotime('Last Monday', strtotime("$y-5-25"))); |
|
60 | $m = date('j', strtotime('+2 Sunday', strtotime("$y-5-1"))); |
|
61 | $f = date('j', strtotime('+3 Sunday', strtotime("$y-6-1"))); |
|
62 | $c = date('j', strtotime('+1 Monday', strtotime("$y-8-1"))); |
|
63 | $l = date('j', strtotime('+1 Monday', strtotime("$y-9-1"))); |
|
64 | $t = date('j', strtotime('+2 Monday', strtotime("$y-10-1"))); |
|
65 | ||
66 | $this->holidays["$y-1-1"] = 'New Years Day'; |
|
67 | $this->holidays["$y-2-14"] = 'Valentine\'s Day'; |
|
68 | $this->holidays["$y-3-17"] = 'St. Patrick\'s Day'; |
|
69 | $this->holidays["$y-4-22"] = 'Earth Day'; |
|
70 | $this->holidays["$y-5-$m"] = 'Mother\'s Day'; |
|
71 | $this->holidays["$y-5-$v"] = 'Victoria Day'; |
|
72 | $this->holidays["$y-6-$f"] = 'Father\'s Day'; |
|
73 | $this->holidays["$y-7-1"] = 'Canada Day'; |
|
74 | $this->holidays["$y-8-$c"] = 'Civic Holiday'; |
|
75 | $this->holidays["$y-9-$l"] = 'Labour Day'; |
|
76 | $this->holidays["$y-10-$t"] = 'Thanksgiving'; |
|
77 | $this->holidays["$y-10-31"] = 'Halloween'; |
|
78 | $this->holidays["$y-11-11"] = 'Rememberance Day'; |
|
79 | $this->holidays["$y-12-25"] = 'Christmas Day'; |
|
80 | $this->holidays["$y-12-26"] = 'Boxing Day'; |
|
81 | } |
|
82 |