dt-i18n
Version:
A lightweight, modular JavaScript/TypeScript date and time utility with built-in internationalization (i18n) support for many languages.
12 lines (11 loc) • 569 B
TypeScript
import { LocaleData } from '../../types';
import { DateParts } from './date-parts';
/**
* Formats date parts into a string using a format string and locale data.
* This function is now decoupled from the Date object and timezone logic.
* @param dateParts An object containing the components of a date.
* @param format The format string with tokens.
* @param locale The locale data containing translations.
* @returns The formatted and localized string.
*/
export declare function formatDateTime(dateParts: DateParts, format: string, locale: LocaleData): string;