1<?php
2
3/** @generate-class-entries */
4
5class IntlCalendar
6{
7    private function __construct() {}
8
9    /**
10     * @param IntlTimeZone|DateTimeZone|string|null $timezone
11     * @tentative-return-type
12     * @alias intlcal_create_instance
13     */
14    public static function createInstance($timezone = null, ?string $locale = null): ?IntlCalendar {}
15
16    /**
17     * @tentative-return-type
18     * @alias intlcal_equals
19     */
20    public function equals(IntlCalendar $other): bool {}
21
22    /**
23     * @tentative-return-type
24     * @alias intlcal_field_difference
25     */
26    public function fieldDifference(float $timestamp, int $field): int|false {}
27
28    /**
29     * @tentative-return-type
30     * @alias intlcal_add
31     */
32    public function add(int $field, int $value): bool {}
33
34    /**
35     * @tentative-return-type
36     * @alias intlcal_after
37     */
38    public function after(IntlCalendar $other): bool {}
39
40    /**
41     * @tentative-return-type
42     * @alias intlcal_before
43     */
44    public function before(IntlCalendar $other): bool {}
45
46    /**
47     * @return bool
48     * @alias intlcal_clear
49     */
50    public function clear(?int $field = null) {} // TODO make return type void
51
52    /**
53     * @tentative-return-type
54     * @alias intlcal_from_date_time
55     */
56    public static function fromDateTime(DateTime|string $datetime, ?string $locale = null): ?IntlCalendar {}
57
58    /**
59     * @tentative-return-type
60     * @alias intlcal_get
61     */
62    public function get(int $field): int|false {}
63
64    /**
65     * @tentative-return-type
66     * @alias intlcal_get_actual_maximum
67     */
68    public function getActualMaximum(int $field): int|false {}
69
70    /**
71     * @tentative-return-type
72     * @alias intlcal_get_actual_minimum
73     */
74    public function getActualMinimum(int $field): int|false {}
75
76    /**
77     * @return array<int, string>
78     * @tentative-return-type
79     * @alias intlcal_get_available_locales
80     */
81    public static function getAvailableLocales(): array {}
82
83    /**
84     * @tentative-return-type
85     * @alias intlcal_get_day_of_week_type
86     */
87    public function getDayOfWeekType(int $dayOfWeek): int|false {}
88
89    /**
90     * @tentative-return-type
91     * @alias intlcal_get_error_code
92     */
93    public function getErrorCode(): int|false {}
94
95    /**
96     * @tentative-return-type
97     * @alias intlcal_get_error_message
98     */
99    public function getErrorMessage(): string|false {}
100
101    /**
102     * @tentative-return-type
103     * @alias intlcal_get_first_day_of_week
104     */
105    public function getFirstDayOfWeek(): int|false {}
106
107    /**
108     * @tentative-return-type
109     * @alias intlcal_get_greatest_minimum
110     */
111    public function getGreatestMinimum(int $field): int|false {}
112
113    /**
114     * @tentative-return-type
115     * @alias intlcal_get_keyword_values_for_locale
116     */
117    public static function getKeywordValuesForLocale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|false {}
118
119    /**
120     * @tentative-return-type
121     * @alias intlcal_get_least_maximum
122     */
123    public function getLeastMaximum(int $field): int|false {}
124
125    /**
126     * @tentative-return-type
127     * @alias intlcal_get_locale
128     */
129    public function getLocale(int $type): string|false {}
130
131    /**
132     * @tentative-return-type
133     * @alias intlcal_get_maximum
134     */
135    public function getMaximum(int $field): int|false {}
136
137    /**
138     * @tentative-return-type
139     * @alias intlcal_get_minimal_days_in_first_week
140     */
141    public function getMinimalDaysInFirstWeek(): int|false {}
142
143    /**
144     * @return bool
145     * @alias intlcal_set_minimal_days_in_first_week
146     */
147    public function setMinimalDaysInFirstWeek(int $days) {} // TODO make return void
148
149    /**
150     * @tentative-return-type
151     * @alias intlcal_get_minimum
152     */
153    public function getMinimum(int $field): int|false {}
154
155    /**
156     * @tentative-return-type
157     * @alias intlcal_get_now
158     */
159    public static function getNow(): float {}
160
161    /**
162     * @tentative-return-type
163     * @alias intlcal_get_repeated_wall_time_option
164     */
165    public function getRepeatedWallTimeOption(): int {}
166
167    /**
168     * @tentative-return-type
169     * @alias intlcal_get_skipped_wall_time_option
170     */
171    public function getSkippedWallTimeOption(): int {}
172
173    /**
174     * @tentative-return-type
175     * @alias intlcal_get_time
176     */
177    public function getTime(): float|false {}
178
179    /**
180     * @tentative-return-type
181     * @alias intlcal_get_time_zone
182     */
183    public function getTimeZone(): IntlTimeZone|false {}
184
185    /**
186     * @tentative-return-type
187     * @alias intlcal_get_type
188     */
189    public function getType(): string {}
190
191    /**
192     * @tentative-return-type
193     * @alias intlcal_get_weekend_transition
194     */
195    public function getWeekendTransition(int $dayOfWeek): int|false {}
196
197    /**
198     * @tentative-return-type
199     * @alias intlcal_in_daylight_time
200     */
201    public function inDaylightTime(): bool {}
202
203    /**
204     * @tentative-return-type
205     * @alias intlcal_is_equivalent_to
206     */
207    public function isEquivalentTo(IntlCalendar $other): bool {}
208
209    /**
210     * @tentative-return-type
211     * @alias intlcal_is_lenient
212     */
213    public function isLenient(): bool {}
214
215    /**
216     * @tentative-return-type
217     * @alias intlcal_is_weekend
218     */
219    public function isWeekend(?float $timestamp = null): bool {}
220
221    /**
222     * @param int|bool $value
223     * @alias intlcal_roll
224     * @tentative-return-type
225     */
226    public function roll(int $field, $value): bool {}
227
228    /**
229     * @tentative-return-type
230     * @alias intlcal_is_set
231     */
232    public function isSet(int $field): bool {}
233
234    /**
235     * @return bool
236     * @alias intlcal_set
237     */
238    public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {} // TODO make return type void
239
240    /**
241     * @return bool
242     * @alias intlcal_set_first_day_of_week
243     */
244    public function setFirstDayOfWeek(int $dayOfWeek) {} // TODO make return type void
245
246    /**
247     * @return bool
248     * @alias intlcal_set_lenient
249     */
250    public function setLenient(bool $lenient) {} // TODO make return type void
251
252    /**
253     * @return bool
254     * @alias intlcal_set_repeated_wall_time_option
255     */
256    public function setRepeatedWallTimeOption(int $option) {} // TODO make return type void
257
258    /**
259     * @return bool
260     * @alias intlcal_set_skipped_wall_time_option
261     */
262    public function setSkippedWallTimeOption(int $option) {} // TODO make return type void
263
264    /**
265     * @tentative-return-type
266     * @alias intlcal_set_time
267     */
268    public function setTime(float $timestamp): bool {}
269
270    /**
271     * @param IntlTimeZone|DateTimeZone|string|null $timezone
272     * @tentative-return-type
273     * @alias intlcal_set_time_zone
274     */
275    public function setTimeZone($timezone): bool {}
276
277    /**
278     * @tentative-return-type
279     * @alias intlcal_to_date_time
280     */
281    public function toDateTime(): DateTime|false {}
282}
283
284class IntlGregorianCalendar extends IntlCalendar
285{
286    /**
287     * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
288     * @param string|int|null $localeOrMonth
289     * @param int $day
290     * @param int $hour
291     * @param int $minute
292     * @param int $second
293     */
294    public function __construct($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN) {}
295
296    /**
297     * @tentative-return-type
298     * @alias intlgregcal_set_gregorian_change
299     */
300    public function setGregorianChange(float $timestamp): bool {}
301
302    /**
303     * @tentative-return-type
304     * @alias intlgregcal_get_gregorian_change
305     */
306    public function getGregorianChange(): float {}
307
308    /**
309     * @tentative-return-type
310     * @alias intlgregcal_is_leap_year
311     */
312    public function isLeapYear(int $year): bool {}
313}
314