UNPKG

834 BTypeScriptView Raw
1import { Locale } from "../types/locale";
2import { ParsedOptions } from "../types/options";
3export declare type token = "D" | "F" | "G" | "H" | "J" | "K" | "M" | "S" | "U" | "W" | "Y" | "Z" | "d" | "h" | "i" | "j" | "l" | "m" | "n" | "s" | "u" | "w" | "y";
4export declare const monthToStr: (monthNumber: number, shorthand: boolean, locale: Locale) => string;
5export declare type RevFormatFn = (date: Date, data: string, locale: Locale) => Date | void | undefined;
6export declare type RevFormat = Record<string, RevFormatFn>;
7export declare const revFormat: RevFormat;
8export declare type TokenRegex = {
9 [k in token]: string;
10};
11export declare const tokenRegex: TokenRegex;
12export declare type Formats = Record<token, (date: Date, locale: Locale, options: ParsedOptions) => string | number>;
13export declare const formats: Formats;