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