Locale
import type { Locale } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
The locale object with all functions and data needed to parse and format dates. This is what each locale implements and exports.
interface Locale {
code: string;
formatDistance: FormatDistanceFn;
formatLong: FormatLong;
formatRelative: FormatRelativeFn;
localize: Localize;
match: Match;
options?: LocaleOptions;
}§Properties
§
formatDistance: FormatDistanceFn
[src]The function to format distance
§
formatLong: FormatLong
[src]The object with functions that return localized formats
§
formatRelative: FormatRelativeFn
[src]The function to relative time
§
options?: LocaleOptions
[src]An object with locale options