1 | export type TimeTransform = (d: Date, ...rest: any[]) => Date;
|
2 | type TimeRange = (start: Date, stop: Date, step: number, shouldAdjust?: boolean) => Date[];
|
3 | type TimeProcess = (d: Date, ...rest: any[]) => void;
|
4 | type TimeField = (d: Date) => number;
|
5 | export declare const DURATION_SECOND = 1000;
|
6 | export declare const DURATION_MINUTE: number;
|
7 | export declare const DURATION_HOUR: number;
|
8 | export declare const DURATION_DAY: number;
|
9 | export declare const DURATION_WEEK: number;
|
10 | export declare const DURATION_MONTH: number;
|
11 | export declare const DURATION_YEAR: number;
|
12 | export type Interval = {
|
13 | floor: TimeTransform;
|
14 | ceil: TimeTransform;
|
15 | range: TimeRange;
|
16 | duration: number;
|
17 | };
|
18 | export type IntervalMap = {
|
19 | millisecond: Interval;
|
20 | second: Interval;
|
21 | minute: Interval;
|
22 | hour: Interval;
|
23 | day: Interval;
|
24 | week: Interval;
|
25 | month: Interval;
|
26 | year: Interval;
|
27 | };
|
28 | export declare function createInterval(duration: number, floorish: TimeProcess, offseti: TimeProcess, field?: TimeField): {
|
29 | ceil: TimeTransform;
|
30 | floor: TimeTransform;
|
31 | range: (start: Date, stop: Date, step: number, shouldAdjust?: boolean) => any[];
|
32 | duration: number;
|
33 | };
|
34 | export declare const millisecond: Interval;
|
35 | export declare const second: Interval;
|
36 | export declare const minute: Interval;
|
37 | export declare const hour: Interval;
|
38 | export declare const day: Interval;
|
39 | export declare const month: Interval;
|
40 | export declare const week: Interval;
|
41 | export declare const year: Interval;
|
42 | export declare const localIntervalMap: IntervalMap;
|
43 | export {};
|