UNPKG

1.43 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;
10 /**
11 * @deprecated since 0.2.12. Use keepLocalTime instead
12 */
13 keepCalendarTime?: boolean;
14}
15
16/** @deprecated */
17export type EraLength = StringUnitLength;
18
19export type NumberingSystem = Intl.DateTimeFormatOptions extends { numberingSystem?: infer T } ? T :
20 | 'arab'
21 | 'arabext'
22 | 'bali'
23 | 'beng'
24 | 'deva'
25 | 'fullwide'
26 | 'gujr'
27 | 'guru'
28 | 'hanidec'
29 | 'khmr'
30 | 'knda'
31 | 'laoo'
32 | 'latn'
33 | 'limb'
34 | 'mlym'
35 | 'mong'
36 | 'mymr'
37 | 'orya'
38 | 'tamldec'
39 | 'telu'
40 | 'thai'
41 | 'tibt';
42
43export type CalendarSystem = Intl.DateTimeFormatOptions extends { calendar?: infer T } ? T :
44 | 'buddhist'
45 | 'chinese'
46 | 'coptic'
47 | 'ethioaa'
48 | 'ethiopic'
49 | 'gregory'
50 | 'hebrew'
51 | 'indian'
52 | 'islamic'
53 | 'islamicc'
54 | 'iso8601'
55 | 'japanese'
56 | 'persian'
57 | 'roc';
58
59export type HourCycle = 'h11' | 'h12' | 'h23' | 'h24';
60
61export type StringUnitLength = 'narrow' | 'short' | 'long';
62export type NumberUnitLength = 'numeric' | '2-digit';
63export type UnitLength = StringUnitLength | NumberUnitLength;