UNPKG

dt-i18n

Version:

A lightweight, modular JavaScript/TypeScript date and time utility with built-in internationalization (i18n) support for many languages.

10 lines (9 loc) 496 B
import { LocaleData } from '../../types'; /** * Parses a date string according to a specified format string and locale. * @param dateString The string representation of the date. * @param formatString The format to parse against (e.g., 'DD/MM/YYYY'). * @param locale The locale data containing month and day names. * @returns A valid Date object, or an invalid Date if parsing fails. */ export declare function parseDate(dateString: string, formatString: string, locale: LocaleData): Date;