import { DatePart, DatePartValues } from './types'; export interface LocaleMeta { partsOrder: DatePart[]; separator: string; } /** * Parse a given string into a JS Date instance. The date is expected to be in ISO-8601 * YYYY-MM-DD format, or formatted according to the locale if the meta was passed. Note that * single digit months or days are zero-padded automatically, meaning YYYY-M-D is also a valid * format. * * If no date could be parsed (either because it's incomplete, wrong format or just * non-sensical), returns `null`. */ export declare const parseDate: (value: string, meta?: LocaleMeta) => Date | null; /** * Format date parts into an (unvalidated) ISO-8601 string. */ export declare const partsToUnvalidatedISO8601: (parts: DatePartValues) => string; /** * Given a locale, figure out the order of date parts and what the separator used is. * * This uses a dummy date to format it with the provided locale using the native Intl * APIs and extracts the order from the formatted date. */ export declare const getDateLocaleMeta: (locale: string) => LocaleMeta;