1 | import { Component, ParsedComponents, ParsedResult, ParsingReference } from "./types.js";
|
2 | import dayjs, { QUnitType } from "dayjs";
|
3 | export declare class ReferenceWithTimezone {
|
4 | readonly instant: Date;
|
5 | readonly timezoneOffset?: number | null;
|
6 | constructor(input?: ParsingReference | Date);
|
7 | getDateWithAdjustedTimezone(): Date;
|
8 | getSystemTimezoneAdjustmentMinute(date?: Date, overrideTimezoneOffset?: number): number;
|
9 | }
|
10 | export declare class ParsingComponents implements ParsedComponents {
|
11 | private knownValues;
|
12 | private impliedValues;
|
13 | private reference;
|
14 | private _tags;
|
15 | constructor(reference: ReferenceWithTimezone, knownComponents?: {
|
16 | [c in Component]?: number;
|
17 | });
|
18 | get(component: Component): number | null;
|
19 | isCertain(component: Component): boolean;
|
20 | getCertainComponents(): Array<Component>;
|
21 | imply(component: Component, value: number): ParsingComponents;
|
22 | assign(component: Component, value: number): ParsingComponents;
|
23 | delete(component: Component): void;
|
24 | clone(): ParsingComponents;
|
25 | isOnlyDate(): boolean;
|
26 | isOnlyTime(): boolean;
|
27 | isOnlyWeekdayComponent(): boolean;
|
28 | isDateWithUnknownYear(): boolean;
|
29 | isValidDate(): boolean;
|
30 | toString(): string;
|
31 | dayjs(): dayjs.Dayjs;
|
32 | date(): Date;
|
33 | addTag(tag: string): ParsingComponents;
|
34 | addTags(tags: string[] | Set<string>): ParsingComponents;
|
35 | tags(): Set<string>;
|
36 | private dateWithoutTimezoneAdjustment;
|
37 | static createRelativeFromReference(reference: ReferenceWithTimezone, fragments: {
|
38 | [c in QUnitType]?: number;
|
39 | }): ParsingComponents;
|
40 | }
|
41 | export declare class ParsingResult implements ParsedResult {
|
42 | refDate: Date;
|
43 | index: number;
|
44 | text: string;
|
45 | reference: ReferenceWithTimezone;
|
46 | start: ParsingComponents;
|
47 | end?: ParsingComponents;
|
48 | constructor(reference: ReferenceWithTimezone, index: number, text: string, start?: ParsingComponents, end?: ParsingComponents);
|
49 | clone(): ParsingResult;
|
50 | date(): Date;
|
51 | tags(): Set<string>;
|
52 | toString(): string;
|
53 | }
|