UNPKG

@jsverse/transloco-locale

Version:

The localization (l10n) library plugin for Transloco

16 lines (15 loc) 753 B
import { Locale, DateFormatOptions } from './transloco-locale.types'; export declare const ISO8601_DATE_REGEX: RegExp; /** * check if a given value is in BCP 47 language tag. * * isLocaleFormat('en') // false, * isLocaleFormat('En-us') // false * isLocaleFormat('en-US') // true */ export declare function isLocaleFormat(val: any): val is Locale; export declare function localizeNumber(value: number | string, locale: Locale, options: Intl.NumberFormatOptions): string; export declare function localizeDate(date: Date, locale: Locale, options: DateFormatOptions): string; export declare function isDate(value: any): boolean; export declare function toDate(value: any): Date; export declare function isoStringToDate(match: RegExpMatchArray): Date;