|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the Holiday Library. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Michał Mańko <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE.md |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace Michalmanko\Holiday\Provider; |
|
13
|
|
|
|
|
14
|
|
|
use ArrayObject; |
|
15
|
|
|
use Michalmanko\Holiday\Holiday; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Polish Holidays Provider. |
|
19
|
|
|
* |
|
20
|
|
|
* @author Michał Mańko <[email protected]> |
|
21
|
|
|
*/ |
|
22
|
|
|
class Poland extends AbstractProvider |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* {@inheritdoc} |
|
26
|
|
|
*/ |
|
27
|
13 |
|
protected function prepareHolidays($year) |
|
28
|
|
|
{ |
|
29
|
13 |
|
$data = new ArrayObject(); |
|
30
|
|
|
|
|
31
|
|
|
// Easter Sunday |
|
32
|
13 |
|
$easter = $this->createHoliday( |
|
33
|
13 |
|
'Pierwszy dzień Wielkiej Nocy', |
|
34
|
13 |
|
$this->getEaster($year), |
|
35
|
|
|
Holiday::TYPE_HOLIDAY |
|
36
|
13 |
|
); |
|
37
|
13 |
|
$data->append($easter); |
|
38
|
|
|
// Easter Monday |
|
39
|
13 |
|
$easterMonday = $this->createHoliday( |
|
40
|
13 |
|
'Drugi dzień Wielkiej Nocy', |
|
41
|
13 |
|
$easter, |
|
42
|
|
|
Holiday::TYPE_HOLIDAY |
|
43
|
13 |
|
); |
|
44
|
13 |
|
$easterMonday->modify('+1 day'); |
|
45
|
13 |
|
$data->append($easterMonday); |
|
46
|
|
|
// Pentecost Sunday |
|
47
|
13 |
|
$pentecost = $this->createHoliday( |
|
48
|
13 |
|
'Zielone Świątki', |
|
49
|
13 |
|
$easter, |
|
50
|
|
|
Holiday::TYPE_HOLIDAY |
|
51
|
13 |
|
); |
|
52
|
13 |
|
$pentecost->modify('+49 days'); |
|
53
|
13 |
|
$data->append($pentecost); |
|
54
|
|
|
// Corpus Christi |
|
55
|
13 |
|
$corpusChristi = $this->createHoliday( |
|
56
|
13 |
|
'Boże Ciało', |
|
57
|
13 |
|
$easter, |
|
58
|
|
|
Holiday::TYPE_HOLIDAY |
|
59
|
13 |
|
); |
|
60
|
13 |
|
$corpusChristi->modify('+60 days'); |
|
61
|
13 |
|
$data->append($corpusChristi); |
|
62
|
|
|
// New Year's Day |
|
63
|
13 |
|
$data->append($this->createHoliday( |
|
64
|
13 |
|
'Nowy Rok', |
|
65
|
13 |
|
$year . '-01-01', |
|
66
|
|
|
Holiday::TYPE_HOLIDAY |
|
67
|
13 |
|
)); |
|
68
|
|
|
// Epiphany |
|
69
|
13 |
|
$data->append($this->createHoliday( |
|
70
|
13 |
|
'Trzech króli', |
|
71
|
13 |
|
$year . '-01-06', |
|
72
|
|
|
Holiday::TYPE_HOLIDAY |
|
73
|
13 |
|
)); |
|
74
|
|
|
// Labour Day |
|
75
|
13 |
|
$data->append($this->createHoliday( |
|
76
|
13 |
|
'Święto Pracy', |
|
77
|
13 |
|
$year . '-05-01', |
|
78
|
|
|
Holiday::TYPE_HOLIDAY |
|
79
|
13 |
|
)); |
|
80
|
|
|
// Constitution Day |
|
81
|
13 |
|
$data->append($this->createHoliday( |
|
82
|
13 |
|
'Święto Konstytucji Trzeciego Maja', |
|
83
|
13 |
|
$year . '-05-03', |
|
84
|
|
|
Holiday::TYPE_HOLIDAY |
|
85
|
13 |
|
)); |
|
86
|
|
|
// Assumption of the Blessed Virgin Mary |
|
87
|
13 |
|
$data->append($this->createHoliday( |
|
88
|
13 |
|
'Wniebowzięcie Najświętszej Maryi Panny', |
|
89
|
13 |
|
$year . '-08-15', |
|
90
|
|
|
Holiday::TYPE_HOLIDAY |
|
91
|
13 |
|
)); |
|
92
|
|
|
// All Saints' Day |
|
93
|
13 |
|
$data->append($this->createHoliday( |
|
94
|
13 |
|
'Dzień Zmarłych', |
|
95
|
13 |
|
$year . '-11-01', |
|
96
|
|
|
Holiday::TYPE_HOLIDAY |
|
97
|
13 |
|
)); |
|
98
|
|
|
// Independence Day |
|
99
|
13 |
|
$data->append($this->createHoliday( |
|
100
|
13 |
|
'Dzień Niepodległości', |
|
101
|
13 |
|
$year . '-11-11', |
|
102
|
|
|
Holiday::TYPE_HOLIDAY |
|
103
|
13 |
|
)); |
|
104
|
|
|
// Christmas Day |
|
105
|
13 |
|
$data->append($this->createHoliday( |
|
106
|
13 |
|
'Boże Narodzenie', |
|
107
|
13 |
|
$year . '-12-25', |
|
108
|
|
|
Holiday::TYPE_HOLIDAY |
|
109
|
13 |
|
)); |
|
110
|
|
|
// Boxing Day |
|
111
|
13 |
|
$data->append($this->createHoliday( |
|
112
|
13 |
|
'Drugi dzień Bożego Narodzenia', |
|
113
|
13 |
|
$year . '-12-26', |
|
114
|
|
|
Holiday::TYPE_HOLIDAY |
|
115
|
13 |
|
)); |
|
116
|
|
|
|
|
117
|
13 |
|
return $data->getArrayCopy(); |
|
118
|
|
|
} |
|
119
|
|
|
} |
|
120
|
|
|
|