@scaleway/use-i18n
Version:
A small hook to handle i18n
43 lines • 1.16 kB
TypeScript
//#region src/formatDate.d.ts
declare const formatOptions: {
readonly hour: {
readonly day: 'numeric';
readonly hour: 'numeric';
readonly minute: 'numeric';
readonly month: 'long';
readonly year: 'numeric';
};
readonly hourOnly: {
readonly hour: 'numeric';
readonly minute: 'numeric';
};
readonly long: {
readonly day: 'numeric';
readonly month: 'long';
readonly year: 'numeric';
};
readonly second: {
readonly day: 'numeric';
readonly hour: 'numeric';
readonly minute: 'numeric';
readonly month: 'long';
readonly second: 'numeric';
readonly year: 'numeric';
};
readonly short: {
readonly day: 'numeric';
readonly month: 'short';
readonly year: 'numeric';
};
readonly shortWithoutDay: {
readonly month: 'short';
readonly year: 'numeric';
};
};
declare const complexFormatOptions: {
readonly numeric: (date: Date) => string;
readonly numericHour: (date: Date, locale: string) => string;
};
type FormatDateOptions = keyof typeof formatOptions | keyof typeof complexFormatOptions | Intl.DateTimeFormatOptions;
//#endregion
export { FormatDateOptions };