import { Format, Options } from "./core"; import DateTimeFormatPart = Intl.DateTimeFormatPart; import DateTimeFormat = Intl.DateTimeFormat; export declare function dateTimeFormat(locale: string, options: Options): DateTimeFormat; export interface StringDateFormatter { format(date: Date): string; } export interface PartsDateFormatter { formatToParts(date: Date): Intl.DateTimeFormatPart[]; } export declare type DateFormatter = StringDateFormatter & PartsDateFormatter; export declare function partsFrom(format: Format): DateTimeFormatPart[]; export declare function optionsFrom(formatOrParts: Format | DateTimeFormatPart[]): Options; export declare class Formatters { static create(locale: string, options: string | Options): DateFormatter; } export declare class ImprovedDateTimeFormat implements DateFormatter { private locale; private options; private delegate; constructor(locale: string, options: Options, delegate?: DateTimeFormat); format(date: Date): string; formatToParts(date: Date): Intl.DateTimeFormatPart[]; } export declare class SimpleFormat implements DateFormatter { private locale; private formatString; private partsInOrder; private options; constructor(locale: string, formatString: Format); format(date: Date): string; formatToParts(date: Date): Intl.DateTimeFormatPart[]; private valueFor; } export declare function valueFromParts(parts: DateTimeFormatPart[], partType: Intl.DateTimeFormatPartTypes): string; export declare function format(value: Date, locale: string, options?: Format | Options): string; export declare function formatData(value: Date, locale: string, options?: Options): DateTimeFormatPart[];