UNPKG

1.61 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 } ? T
20 :
21 | "arab"
22 | "arabext"
23 | "bali"
24 | "beng"
25 | "deva"
26 | "fullwide"
27 | "gujr"
28 | "guru"
29 | "hanidec"
30 | "khmr"
31 | "knda"
32 | "laoo"
33 | "latn"
34 | "limb"
35 | "mlym"
36 | "mong"
37 | "mymr"
38 | "orya"
39 | "tamldec"
40 | "telu"
41 | "thai"
42 | "tibt";
43
44export type CalendarSystem = Intl.DateTimeFormatOptions extends { calendar?: infer T } ? T
45 :
46 | "buddhist"
47 | "chinese"
48 | "coptic"
49 | "ethioaa"
50 | "ethiopic"
51 | "gregory"
52 | "hebrew"
53 | "indian"
54 | "islamic"
55 | "islamicc"
56 | "iso8601"
57 | "japanese"
58 | "persian"
59 | "roc";
60
61export type HourCycle = "h11" | "h12" | "h23" | "h24";
62
63export type StringUnitLength = "narrow" | "short" | "long";
64export type NumberUnitLength = "numeric" | "2-digit";
65export type UnitLength = StringUnitLength | NumberUnitLength;