-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.d.ts
27 lines (25 loc) · 1014 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
export interface Options {
/**
* defaults to false
*/
usa?: boolean;
/**
* defaults to the current time
*/
now?: Date;
/**
* defaults to 80
*/
cutoff?: number;
}
declare function parse(str: string, options?: Options): string | null;
export default parse;
export function parseNearbyDays(str: string, now: Date): string | null;
export function parseLastThisNext(string: string, now: Date): string | null;
export function parseAgoFrom(string: string, now: Date): string | null;
export function parseNumberDate(string: string, usa: boolean): string | null;
export function parseNumberDateShortYear(string: string, usa: boolean, cutoff: number): string | null;
export function parseNumberDateNoYear(string: string, usa: boolean, now: Date): string | null;
export function parseWordyDate(string: string, now: Date, cutoff: number): string | null;
export function monthFromName(month: string): number | null;
export function date(year: number, month: number, day: number): string | null;