1 | export interface ParsingOption {
|
2 | forwardDate?: boolean;
|
3 | timezones?: TimezoneAbbrMap;
|
4 | }
|
5 | export interface AmbiguousTimezoneMap {
|
6 | timezoneOffsetDuringDst: number;
|
7 | timezoneOffsetNonDst: number;
|
8 | dstStart: (year: number) => Date;
|
9 | dstEnd: (year: number) => Date;
|
10 | }
|
11 | export declare type TimezoneAbbrMap = {
|
12 | [key: string]: number | AmbiguousTimezoneMap;
|
13 | };
|
14 | export interface ParsingReference {
|
15 | instant?: Date;
|
16 | timezone?: string | number;
|
17 | }
|
18 | export interface ParsedResult {
|
19 | readonly refDate: Date;
|
20 | readonly index: number;
|
21 | readonly text: string;
|
22 | readonly start: ParsedComponents;
|
23 | readonly end?: ParsedComponents;
|
24 | date(): Date;
|
25 | tags(): Set<string>;
|
26 | }
|
27 | export interface ParsedComponents {
|
28 | isCertain(component: Component): boolean;
|
29 | get(component: Component): number | null;
|
30 | date(): Date;
|
31 | tags(): Set<string>;
|
32 | }
|
33 | export declare type Component = "year" | "month" | "day" | "weekday" | "hour" | "minute" | "second" | "millisecond" | "meridiem" | "timezoneOffset";
|
34 | export declare enum Meridiem {
|
35 | AM = 0,
|
36 | PM = 1
|
37 | }
|
38 | export declare enum Weekday {
|
39 | SUNDAY = 0,
|
40 | MONDAY = 1,
|
41 | TUESDAY = 2,
|
42 | WEDNESDAY = 3,
|
43 | THURSDAY = 4,
|
44 | FRIDAY = 5,
|
45 | SATURDAY = 6
|
46 | }
|
47 | export declare enum Month {
|
48 | JANUARY = 1,
|
49 | FEBRUARY = 2,
|
50 | MARCH = 3,
|
51 | APRIL = 4,
|
52 | MAY = 5,
|
53 | JUNE = 6,
|
54 | JULY = 7,
|
55 | AUGUST = 8,
|
56 | SEPTEMBER = 9,
|
57 | OCTOBER = 10,
|
58 | NOVEMBER = 11,
|
59 | DECEMBER = 12
|
60 | }
|