xref: /PHP-8.3/ext/intl/timezone/timezone.stub.php (revision bc4c11ab)
1<?php
2
3/** @generate-class-entries */
4
5/** @not-serializable */
6class IntlTimeZone
7{
8    /**
9     * @var int
10     * @cvalue TimeZone::SHORT
11     */
12    public const DISPLAY_SHORT = UNKNOWN;
13    /**
14     * @var int
15     * @cvalue TimeZone::LONG
16     */
17    public const DISPLAY_LONG = UNKNOWN;
18
19    /**
20     * @var int
21     * @cvalue TimeZone::SHORT_GENERIC
22     */
23    public const DISPLAY_SHORT_GENERIC = UNKNOWN;
24    /**
25     * @var int
26     * @cvalue TimeZone::LONG_GENERIC
27     */
28    public const DISPLAY_LONG_GENERIC = UNKNOWN;
29    /**
30     * @var int
31     * @cvalue TimeZone::SHORT_GMT
32     */
33    public const DISPLAY_SHORT_GMT = UNKNOWN;
34    /**
35     * @var int
36     * @cvalue TimeZone::LONG_GMT
37     */
38    public const DISPLAY_LONG_GMT = UNKNOWN;
39    /**
40     * @var int
41     * @cvalue TimeZone::SHORT_COMMONLY_USED
42     */
43    public const DISPLAY_SHORT_COMMONLY_USED = UNKNOWN;
44    /**
45     * @var int
46     * @cvalue TimeZone::GENERIC_LOCATION
47     */
48    public const DISPLAY_GENERIC_LOCATION = UNKNOWN;
49
50    /**
51     * @var int
52     * @cvalue UCAL_ZONE_TYPE_ANY
53     */
54    public const TYPE_ANY = UNKNOWN;
55    /**
56     * @var int
57     * @cvalue UCAL_ZONE_TYPE_CANONICAL
58     */
59    public const TYPE_CANONICAL = UNKNOWN;
60    /**
61     * @var int
62     * @cvalue UCAL_ZONE_TYPE_CANONICAL_LOCATION
63     */
64    public const TYPE_CANONICAL_LOCATION = UNKNOWN;
65
66    private function __construct() {}
67
68    /**
69     * @tentative-return-type
70     * @alias intltz_count_equivalent_ids
71     */
72    public static function countEquivalentIDs(string $timezoneId): int|false {}
73
74    /**
75     * @tentative-return-type
76     * @alias intltz_create_default
77     */
78    public static function createDefault(): IntlTimeZone {}
79
80    /**
81     * @param IntlTimeZone|string|int|float|null $countryOrRawOffset
82     * @tentative-return-type
83     * @alias intltz_create_enumeration
84     */
85    public static function createEnumeration($countryOrRawOffset = null): IntlIterator|false {}
86
87    /**
88     * @tentative-return-type
89     * @alias intltz_create_time_zone
90     */
91    public static function createTimeZone(string $timezoneId): ?IntlTimeZone {}
92
93    /**
94     * @tentative-return-type
95     * @alias intltz_create_time_zone_id_enumeration
96     */
97    public static function createTimeZoneIDEnumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {}
98
99    /**
100     * @tentative-return-type
101     * @alias intltz_from_date_time_zone
102     */
103    public static function fromDateTimeZone(DateTimeZone $timezone): ?IntlTimeZone {}
104
105    /**
106     * @param bool $isSystemId
107     * @tentative-return-type
108     * @alias intltz_get_canonical_id
109     */
110    public static function getCanonicalID(string $timezoneId, &$isSystemId = null): string|false {}
111
112    /**
113     * @tentative-return-type
114     * @alias intltz_get_display_name
115     */
116    public function getDisplayName(bool $dst = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {}
117
118    /**
119     * @tentative-return-type
120     * @alias intltz_get_dst_savings
121     */
122    public function getDSTSavings(): int {}
123
124    /**
125     * @tentative-return-type
126     * @alias intltz_get_equivalent_id
127     */
128    public static function getEquivalentID(string $timezoneId, int $offset): string|false {}
129
130    /**
131     * @tentative-return-type
132     * @alias intltz_get_error_code
133     */
134    public function getErrorCode(): int|false {}
135
136    /**
137     * @tentative-return-type
138     * @alias intltz_get_error_message
139     */
140    public function getErrorMessage(): string|false {}
141
142    /**
143     * @tentative-return-type
144     * @alias intltz_get_gmt
145     */
146    public static function getGMT(): IntlTimeZone {}
147
148    /**
149     * @tentative-return-type
150     * @alias intltz_get_id
151     */
152    public function getID(): string|false {}
153
154    /**
155     * @param int $rawOffset
156     * @param int $dstOffset
157     * @tentative-return-type
158     * @alias intltz_get_offset
159     */
160    public function getOffset(float $timestamp, bool $local, &$rawOffset, &$dstOffset): bool {}
161
162    /**
163     * @tentative-return-type
164     * @alias intltz_get_raw_offset
165     */
166    public function getRawOffset(): int {}
167
168    /**
169     * @tentative-return-type
170     * @alias intltz_get_region
171     */
172    public static function getRegion(string $timezoneId): string|false {}
173
174    /**
175     * @tentative-return-type
176     * @alias intltz_get_tz_data_version
177     */
178    public static function getTZDataVersion(): string|false {}
179
180    /**
181     * @tentative-return-type
182     * @alias intltz_get_unknown
183     */
184    public static function getUnknown(): IntlTimeZone {}
185
186#if U_ICU_VERSION_MAJOR_NUM >= 52
187    /**
188     * @tentative-return-type
189     * @alias intltz_get_windows_id
190     */
191    public static function getWindowsID(string $timezoneId): string|false {}
192
193    /**
194     * @tentative-return-type
195     * @alias intltz_get_id_for_windows_id
196     */
197    public static function getIDForWindowsID(string $timezoneId, ?string $region = null): string|false {}
198#endif
199    /**
200     * @tentative-return-type
201     * @alias intltz_has_same_rules
202     */
203    public function hasSameRules(IntlTimeZone $other): bool {}
204
205    /**
206     * @tentative-return-type
207     * @alias intltz_to_date_time_zone
208     */
209    public function toDateTimeZone(): DateTimeZone|false {}
210
211    /**
212     * @tentative-return-type
213     * @alias intltz_use_daylight_time
214     */
215    public function useDaylightTime(): bool {}
216}
217