1<?php
2
3/** @generate-class-entries */
4
5/** @not-serializable */
6class IntlDateFormatter
7{
8    /** @cvalue UDAT_FULL */
9    public const int FULL = UNKNOWN;
10    /** @cvalue UDAT_LONG */
11    public const int LONG = UNKNOWN;
12    /** @cvalue UDAT_MEDIUM */
13    public const int MEDIUM = UNKNOWN;
14    /** @cvalue UDAT_SHORT */
15    public const int SHORT = UNKNOWN;
16    /** @cvalue UDAT_NONE */
17    public const int NONE = UNKNOWN;
18    /** @cvalue UDAT_FULL_RELATIVE */
19    public const int RELATIVE_FULL = UNKNOWN;
20    /** @cvalue UDAT_LONG_RELATIVE */
21    public const int RELATIVE_LONG = UNKNOWN;
22    /** @cvalue UDAT_MEDIUM_RELATIVE */
23    public const int RELATIVE_MEDIUM = UNKNOWN;
24    /** @cvalue UDAT_SHORT_RELATIVE */
25    public const int RELATIVE_SHORT = UNKNOWN;
26    /** @cvalue UDAT_PATTERN */
27    public const int PATTERN = UNKNOWN;
28
29    /** @cvalue UCAL_GREGORIAN */
30    public const int GREGORIAN = UNKNOWN;
31    /** @cvalue UCAL_TRADITIONAL */
32    public const int TRADITIONAL = UNKNOWN;
33
34    /**
35     * @param IntlTimeZone|DateTimeZone|string|null $timezone
36     * @param IntlCalendar|int|null $calendar
37     */
38    public function __construct(
39        ?string $locale,
40        int $dateType = IntlDateFormatter::FULL,
41        int $timeType = IntlDateFormatter::FULL,
42        $timezone = null,
43        $calendar = null,
44        ?string $pattern = null
45    ) {}
46
47    /**
48     * @param IntlTimeZone|DateTimeZone|string|null $timezone
49     * @tentative-return-type
50     * @alias datefmt_create
51     */
52    public static function create(
53        ?string $locale,
54        int $dateType = IntlDateFormatter::FULL,
55        int $timeType = IntlDateFormatter::FULL,
56        $timezone = null,
57        IntlCalendar|int|null $calendar = null,
58        ?string $pattern = null
59    ): ?IntlDateFormatter {}
60
61    /**
62     * @tentative-return-type
63     * @alias datefmt_get_datetype
64     */
65    public function getDateType(): int|false {}
66
67    /**
68     * @tentative-return-type
69     * @alias datefmt_get_timetype
70     */
71    public function getTimeType(): int|false {}
72
73    /**
74     * @tentative-return-type
75     * @alias datefmt_get_calendar
76     */
77    public function getCalendar(): int|false {}
78
79    /**
80     * @tentative-return-type
81     * @alias datefmt_set_calendar
82     */
83    public function setCalendar(IntlCalendar|int|null $calendar): bool {}
84
85    /**
86     * @tentative-return-type
87     * @alias datefmt_get_timezone_id
88     */
89    public function getTimeZoneId(): string|false {}
90
91    /**
92     * @tentative-return-type
93     * @alias datefmt_get_calendar_object
94     */
95    public function getCalendarObject(): IntlCalendar|false|null {}
96
97    /**
98     * @tentative-return-type
99     * @alias datefmt_get_timezone
100     */
101    public function getTimeZone(): IntlTimeZone|false {}
102
103    /**
104     * @param IntlTimeZone|DateTimeZone|string|null $timezone
105     * @tentative-return-type
106     * @alias datefmt_set_timezone
107     */
108    public function setTimeZone($timezone): bool {}
109
110    /**
111     * @tentative-return-type
112     * @alias datefmt_set_pattern
113     */
114    public function setPattern(string $pattern): bool {}
115
116    /**
117     * @tentative-return-type
118     * @alias datefmt_get_pattern
119     */
120    public function getPattern(): string|false {}
121
122    /**
123     * @tentative-return-type
124     * @alias datefmt_get_locale
125     */
126    public function getLocale(int $type = ULOC_ACTUAL_LOCALE): string|false {}
127
128    /**
129     * @tentative-return-type
130     * @alias datefmt_set_lenient
131     */
132    public function setLenient(bool $lenient): void {}
133
134    /**
135     * @tentative-return-type
136     * @alias datefmt_is_lenient
137     */
138    public function isLenient(): bool {}
139
140    /**
141     * @param IntlCalendar|DateTimeInterface|array|string|int|float $datetime
142     * @tentative-return-type
143     * @alias datefmt_format
144     */
145    public function format($datetime): string|false {}
146
147    /**
148     * @param IntlCalendar|DateTimeInterface $datetime
149     * @param array|int|string|null $format
150     * @tentative-return-type
151     * @alias datefmt_format_object
152     */
153    public static function formatObject($datetime, $format = null, ?string $locale = null): string|false {}
154
155    /**
156     * @param int $offset
157     * @tentative-return-type
158     * @alias datefmt_parse
159     */
160    public function parse(string $string, &$offset = null): int|float|false {}
161
162    /**
163     * @param int $offset
164     */
165    public function parseToCalendar(string $string, &$offset = null): int|float|false {}
166
167    /**
168     * @param int $offset
169     * @return array<string, int>|false
170     * @tentative-return-type
171     * @alias datefmt_localtime
172     */
173    public function localtime(string $string, &$offset = null): array|false {}
174
175    /**
176     * @tentative-return-type
177     * @alias datefmt_get_error_code
178     */
179    public function getErrorCode(): int {}
180
181    /**
182     * @tentative-return-type
183     * @alias datefmt_get_error_message
184     */
185    public function getErrorMessage(): string {}
186}
187