xref: /PHP-8.1/ext/intl/timezone/timezone.stub.php (revision 65b96397)
1<?php
2
3/** @generate-class-entries */
4
5class IntlTimeZone
6{
7    private function __construct() {}
8
9    /**
10     * @tentative-return-type
11     * @alias intltz_count_equivalent_ids
12     */
13    public static function countEquivalentIDs(string $timezoneId): int|false {}
14
15    /**
16     * @tentative-return-type
17     * @alias intltz_create_default
18     */
19    public static function createDefault(): IntlTimeZone {}
20
21    /**
22     * @param IntlTimeZone|string|int|float|null $countryOrRawOffset
23     * @tentative-return-type
24     * @alias intltz_create_enumeration
25     */
26    public static function createEnumeration($countryOrRawOffset = null): IntlIterator|false {}
27
28    /**
29     * @tentative-return-type
30     * @alias intltz_create_time_zone
31     */
32    public static function createTimeZone(string $timezoneId): ?IntlTimeZone {}
33
34    /**
35     * @tentative-return-type
36     * @alias intltz_create_time_zone_id_enumeration
37     */
38    public static function createTimeZoneIDEnumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlIterator|false {}
39
40    /**
41     * @tentative-return-type
42     * @alias intltz_from_date_time_zone
43     */
44    public static function fromDateTimeZone(DateTimeZone $timezone): ?IntlTimeZone {}
45
46    /**
47     * @param bool $isSystemId
48     * @tentative-return-type
49     * @alias intltz_get_canonical_id
50     */
51    public static function getCanonicalID(string $timezoneId, &$isSystemId = null): string|false {}
52
53    /**
54     * @tentative-return-type
55     * @alias intltz_get_display_name
56     */
57    public function getDisplayName(bool $dst = false, int $style = IntlTimeZone::DISPLAY_LONG, ?string $locale = null): string|false {}
58
59    /**
60     * @tentative-return-type
61     * @alias intltz_get_dst_savings
62     */
63    public function getDSTSavings(): int {}
64
65    /**
66     * @tentative-return-type
67     * @alias intltz_get_equivalent_id
68     */
69    public static function getEquivalentID(string $timezoneId, int $offset): string|false {}
70
71    /**
72     * @tentative-return-type
73     * @alias intltz_get_error_code
74     */
75    public function getErrorCode(): int|false {}
76
77    /**
78     * @tentative-return-type
79     * @alias intltz_get_error_message
80     */
81    public function getErrorMessage(): string|false {}
82
83    /**
84     * @tentative-return-type
85     * @alias intltz_get_gmt
86     */
87    public static function getGMT(): IntlTimeZone {}
88
89    /**
90     * @tentative-return-type
91     * @alias intltz_get_id
92     */
93    public function getID(): string|false {}
94
95    /**
96     * @param int $rawOffset
97     * @param int $dstOffset
98     * @tentative-return-type
99     * @alias intltz_get_offset
100     */
101    public function getOffset(float $timestamp, bool $local, &$rawOffset, &$dstOffset): bool {}
102
103    /**
104     * @tentative-return-type
105     * @alias intltz_get_raw_offset
106     */
107    public function getRawOffset(): int {}
108
109    /**
110     * @tentative-return-type
111     * @alias intltz_get_region
112     */
113    public static function getRegion(string $timezoneId): string|false {}
114
115    /**
116     * @tentative-return-type
117     * @alias intltz_get_tz_data_version
118     */
119    public static function getTZDataVersion(): string|false {}
120
121    /**
122     * @tentative-return-type
123     * @alias intltz_get_unknown
124     */
125    public static function getUnknown(): IntlTimeZone {}
126
127#if U_ICU_VERSION_MAJOR_NUM >= 52
128    /**
129     * @tentative-return-type
130     * @alias intltz_get_windows_id
131     */
132    public static function getWindowsID(string $timezoneId): string|false {}
133
134    /**
135     * @tentative-return-type
136     * @alias intltz_get_id_for_windows_id
137     */
138    public static function getIDForWindowsID(string $timezoneId, ?string $region = null): string|false {}
139#endif
140    /**
141     * @tentative-return-type
142     * @alias intltz_has_same_rules
143     */
144    public function hasSameRules(IntlTimeZone $other): bool {}
145
146    /**
147     * @tentative-return-type
148     * @alias intltz_to_date_time_zone
149     */
150    public function toDateTimeZone(): DateTimeZone|false {}
151
152    /**
153     * @tentative-return-type
154     * @alias intltz_use_daylight_time
155     */
156    public function useDaylightTime(): bool {}
157}
158