Total Complexity | 1 |
Total Lines | 305 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | final class CalendarPreferenceData |
||
15 | { |
||
16 | /** |
||
17 | * @link https://github.com/unicode-org/cldr-json/blob/47.0.0/cldr-json/cldr-core/availableLocales.json |
||
18 | */ |
||
19 | public const BY_REGION = |
||
20 | [ |
||
21 | '001' => [ |
||
22 | 'gregorian', |
||
23 | ], |
||
24 | 'AE' => [ |
||
25 | 'gregorian', |
||
26 | 'islamic-umalqura', |
||
27 | 'islamic', |
||
28 | 'islamic-civil', |
||
29 | 'islamic-tbla', |
||
30 | ], |
||
31 | 'AF' => [ |
||
32 | 'persian', |
||
33 | 'gregorian', |
||
34 | 'islamic', |
||
35 | 'islamic-civil', |
||
36 | 'islamic-tbla', |
||
37 | ], |
||
38 | 'AL' => [ |
||
39 | 'gregorian', |
||
40 | 'islamic-civil', |
||
41 | 'islamic-tbla', |
||
42 | ], |
||
43 | 'AZ' => [ |
||
44 | 'gregorian', |
||
45 | 'islamic-civil', |
||
46 | 'islamic-tbla', |
||
47 | ], |
||
48 | 'BD' => [ |
||
49 | 'gregorian', |
||
50 | 'islamic', |
||
51 | 'islamic-civil', |
||
52 | 'islamic-tbla', |
||
53 | ], |
||
54 | 'BH' => [ |
||
55 | 'gregorian', |
||
56 | 'islamic-umalqura', |
||
57 | 'islamic', |
||
58 | 'islamic-civil', |
||
59 | 'islamic-tbla', |
||
60 | ], |
||
61 | 'CN' => [ |
||
62 | 'gregorian', |
||
63 | 'chinese', |
||
64 | ], |
||
65 | 'CX' => [ |
||
66 | 'gregorian', |
||
67 | 'chinese', |
||
68 | ], |
||
69 | 'DJ' => [ |
||
70 | 'gregorian', |
||
71 | 'islamic', |
||
72 | 'islamic-civil', |
||
73 | 'islamic-tbla', |
||
74 | ], |
||
75 | 'DZ' => [ |
||
76 | 'gregorian', |
||
77 | 'islamic', |
||
78 | 'islamic-civil', |
||
79 | 'islamic-tbla', |
||
80 | ], |
||
81 | 'EG' => [ |
||
82 | 'gregorian', |
||
83 | 'coptic', |
||
84 | 'islamic', |
||
85 | 'islamic-civil', |
||
86 | 'islamic-tbla', |
||
87 | ], |
||
88 | 'EH' => [ |
||
89 | 'gregorian', |
||
90 | 'islamic', |
||
91 | 'islamic-civil', |
||
92 | 'islamic-tbla', |
||
93 | ], |
||
94 | 'ER' => [ |
||
95 | 'gregorian', |
||
96 | 'islamic', |
||
97 | 'islamic-civil', |
||
98 | 'islamic-tbla', |
||
99 | ], |
||
100 | 'ET' => [ |
||
101 | 'gregorian', |
||
102 | 'ethiopic', |
||
103 | ], |
||
104 | 'HK' => [ |
||
105 | 'gregorian', |
||
106 | 'chinese', |
||
107 | ], |
||
108 | 'ID' => [ |
||
109 | 'gregorian', |
||
110 | 'islamic', |
||
111 | 'islamic-civil', |
||
112 | 'islamic-tbla', |
||
113 | ], |
||
114 | 'IL' => [ |
||
115 | 'gregorian', |
||
116 | 'hebrew', |
||
117 | 'islamic', |
||
118 | 'islamic-civil', |
||
119 | 'islamic-tbla', |
||
120 | ], |
||
121 | 'IN' => [ |
||
122 | 'gregorian', |
||
123 | 'indian', |
||
124 | ], |
||
125 | 'IQ' => [ |
||
126 | 'gregorian', |
||
127 | 'islamic', |
||
128 | 'islamic-civil', |
||
129 | 'islamic-tbla', |
||
130 | ], |
||
131 | 'IR' => [ |
||
132 | 'persian', |
||
133 | 'gregorian', |
||
134 | 'islamic', |
||
135 | 'islamic-civil', |
||
136 | 'islamic-tbla', |
||
137 | ], |
||
138 | 'JO' => [ |
||
139 | 'gregorian', |
||
140 | 'islamic', |
||
141 | 'islamic-civil', |
||
142 | 'islamic-tbla', |
||
143 | ], |
||
144 | 'JP' => [ |
||
145 | 'gregorian', |
||
146 | 'japanese', |
||
147 | ], |
||
148 | 'KM' => [ |
||
149 | 'gregorian', |
||
150 | 'islamic', |
||
151 | 'islamic-civil', |
||
152 | 'islamic-tbla', |
||
153 | ], |
||
154 | 'KR' => [ |
||
155 | 'gregorian', |
||
156 | 'dangi', |
||
157 | ], |
||
158 | 'KW' => [ |
||
159 | 'gregorian', |
||
160 | 'islamic-umalqura', |
||
161 | 'islamic', |
||
162 | 'islamic-civil', |
||
163 | 'islamic-tbla', |
||
164 | ], |
||
165 | 'LB' => [ |
||
166 | 'gregorian', |
||
167 | 'islamic', |
||
168 | 'islamic-civil', |
||
169 | 'islamic-tbla', |
||
170 | ], |
||
171 | 'LY' => [ |
||
172 | 'gregorian', |
||
173 | 'islamic', |
||
174 | 'islamic-civil', |
||
175 | 'islamic-tbla', |
||
176 | ], |
||
177 | 'MA' => [ |
||
178 | 'gregorian', |
||
179 | 'islamic', |
||
180 | 'islamic-civil', |
||
181 | 'islamic-tbla', |
||
182 | ], |
||
183 | 'MO' => [ |
||
184 | 'gregorian', |
||
185 | 'chinese', |
||
186 | ], |
||
187 | 'MR' => [ |
||
188 | 'gregorian', |
||
189 | 'islamic', |
||
190 | 'islamic-civil', |
||
191 | 'islamic-tbla', |
||
192 | ], |
||
193 | 'MV' => [ |
||
194 | 'gregorian', |
||
195 | 'islamic-civil', |
||
196 | 'islamic-tbla', |
||
197 | ], |
||
198 | 'MY' => [ |
||
199 | 'gregorian', |
||
200 | 'islamic', |
||
201 | 'islamic-civil', |
||
202 | 'islamic-tbla', |
||
203 | ], |
||
204 | 'NE' => [ |
||
205 | 'gregorian', |
||
206 | 'islamic', |
||
207 | 'islamic-civil', |
||
208 | 'islamic-tbla', |
||
209 | ], |
||
210 | 'OM' => [ |
||
211 | 'gregorian', |
||
212 | 'islamic', |
||
213 | 'islamic-civil', |
||
214 | 'islamic-tbla', |
||
215 | ], |
||
216 | 'PK' => [ |
||
217 | 'gregorian', |
||
218 | 'islamic', |
||
219 | 'islamic-civil', |
||
220 | 'islamic-tbla', |
||
221 | ], |
||
222 | 'PS' => [ |
||
223 | 'gregorian', |
||
224 | 'islamic', |
||
225 | 'islamic-civil', |
||
226 | 'islamic-tbla', |
||
227 | ], |
||
228 | 'QA' => [ |
||
229 | 'gregorian', |
||
230 | 'islamic-umalqura', |
||
231 | 'islamic', |
||
232 | 'islamic-civil', |
||
233 | 'islamic-tbla', |
||
234 | ], |
||
235 | 'SA' => [ |
||
236 | 'gregorian', |
||
237 | 'islamic-umalqura', |
||
238 | 'islamic', |
||
239 | 'islamic-rgsa', |
||
240 | ], |
||
241 | 'SD' => [ |
||
242 | 'gregorian', |
||
243 | 'islamic', |
||
244 | 'islamic-civil', |
||
245 | 'islamic-tbla', |
||
246 | ], |
||
247 | 'SG' => [ |
||
248 | 'gregorian', |
||
249 | 'chinese', |
||
250 | ], |
||
251 | 'SY' => [ |
||
252 | 'gregorian', |
||
253 | 'islamic', |
||
254 | 'islamic-civil', |
||
255 | 'islamic-tbla', |
||
256 | ], |
||
257 | 'TD' => [ |
||
258 | 'gregorian', |
||
259 | 'islamic', |
||
260 | 'islamic-civil', |
||
261 | 'islamic-tbla', |
||
262 | ], |
||
263 | 'TH' => [ |
||
264 | 'buddhist', |
||
265 | 'gregorian', |
||
266 | ], |
||
267 | 'TJ' => [ |
||
268 | 'gregorian', |
||
269 | 'islamic-civil', |
||
270 | 'islamic-tbla', |
||
271 | ], |
||
272 | 'TM' => [ |
||
273 | 'gregorian', |
||
274 | 'islamic-civil', |
||
275 | 'islamic-tbla', |
||
276 | ], |
||
277 | 'TN' => [ |
||
278 | 'gregorian', |
||
279 | 'islamic', |
||
280 | 'islamic-civil', |
||
281 | 'islamic-tbla', |
||
282 | ], |
||
283 | 'TR' => [ |
||
284 | 'gregorian', |
||
285 | 'islamic-civil', |
||
286 | 'islamic-tbla', |
||
287 | ], |
||
288 | 'TW' => [ |
||
289 | 'gregorian', |
||
290 | 'roc', |
||
291 | 'chinese', |
||
292 | ], |
||
293 | 'UZ' => [ |
||
294 | 'gregorian', |
||
295 | 'islamic-civil', |
||
296 | 'islamic-tbla', |
||
297 | ], |
||
298 | 'XK' => [ |
||
299 | 'gregorian', |
||
300 | 'islamic-civil', |
||
301 | 'islamic-tbla', |
||
302 | ], |
||
303 | 'YE' => [ |
||
304 | 'gregorian', |
||
305 | 'islamic', |
||
306 | 'islamic-civil', |
||
307 | 'islamic-tbla', |
||
308 | ], |
||
309 | ]; |
||
310 | |||
311 | /** |
||
312 | * Returns the preference calendar for a region. |
||
313 | */ |
||
314 | public static function preferred_calendar_for_region(string $region): string |
||
321 |