UNPKG

1.69 kBTypeScriptView Raw
1export type DateTimeFormatOptions = Intl.DateTimeFormatOptions;
2
3export interface ZoneOptions {
4 /**
5 * If true, adjust the underlying time so that the local time stays the same, but in the target zone.
6 * You should rarely need this.
7 * Defaults to false.
8 */
9 keepLocalTime?: boolean | undefined;
10 /**
11 * @deprecated since 0.2.12. Use keepLocalTime instead
12 */
13 keepCalendarTime?: boolean | undefined;
14}
15
16/** @deprecated */
17export type EraLength = StringUnitLength;
18
19export type NumberingSystem = Intl.DateTimeFormatOptions extends { numberingSystem?: infer T }
20 ? T
21 :
22 | 'arab'
23 | 'arabext'
24 | 'bali'
25 | 'beng'
26 | 'deva'
27 | 'fullwide'
28 | 'gujr'
29 | 'guru'
30 | 'hanidec'
31 | 'khmr'
32 | 'knda'
33 | 'laoo'
34 | 'latn'
35 | 'limb'
36 | 'mlym'
37 | 'mong'
38 | 'mymr'
39 | 'orya'
40 | 'tamldec'
41 | 'telu'
42 | 'thai'
43 | 'tibt';
44
45export type CalendarSystem = Intl.DateTimeFormatOptions extends { calendar?: infer T }
46 ? T
47 :
48 | 'buddhist'
49 | 'chinese'
50 | 'coptic'
51 | 'ethioaa'
52 | 'ethiopic'
53 | 'gregory'
54 | 'hebrew'
55 | 'indian'
56 | 'islamic'
57 | 'islamicc'
58 | 'iso8601'
59 | 'japanese'
60 | 'persian'
61 | 'roc';
62
63export type HourCycle = 'h11' | 'h12' | 'h23' | 'h24';
64
65export type StringUnitLength = 'narrow' | 'short' | 'long';
66export type NumberUnitLength = 'numeric' | '2-digit';
67export type UnitLength = StringUnitLength | NumberUnitLength;