@sebgroup/frontend-tools
Version:
A set of frontend tools
11 lines (10 loc) • 410 B
TypeScript
declare type DateTimeFormat = Intl.DateTimeFormatOptions;
/**
* Date formatter
* @param date The date object or date string
* @param format The output format
* @param locale The locale. Default is `sv-SE`
* @returns The formattted date or the input if it fails to parse it
*/
export declare function formatDate(date: string | Date, format?: DateTimeFormat, locale?: string): string;
export {};