registration
This commit is contained in:
32
frontend/style/node_modules/date-fns/intlFormat.d.ts
generated
vendored
32
frontend/style/node_modules/date-fns/intlFormat.d.ts
generated
vendored
@@ -1,5 +1,9 @@
|
||||
import type { DateArg, MaybeArray } from "./types.js";
|
||||
/**
|
||||
* The locale string (see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
||||
* @deprecated
|
||||
*
|
||||
* [TODO] Remove in v4
|
||||
*/
|
||||
export type IntlFormatLocale = Intl.ResolvedDateTimeFormatOptions["locale"];
|
||||
/**
|
||||
@@ -10,8 +14,8 @@ export type IntlFormatFormatOptions = Intl.DateTimeFormatOptions;
|
||||
* The locale options.
|
||||
*/
|
||||
export interface IntlFormatLocaleOptions {
|
||||
/** The locale(s) to use (see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument) */
|
||||
locale: IntlFormatLocale | IntlFormatLocale[];
|
||||
/** The locales to use (see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument) */
|
||||
locale: MaybeArray<Intl.ResolvedDateTimeFormatOptions["locale"]>;
|
||||
}
|
||||
/**
|
||||
* @name intlFormat
|
||||
@@ -25,8 +29,6 @@ export interface IntlFormatLocaleOptions {
|
||||
*
|
||||
* > ⚠️ Please note that before Node version 13.0.0, only the locale data for en-US is available by default.
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to format
|
||||
*
|
||||
* @returns The formatted date string
|
||||
@@ -38,12 +40,8 @@ export interface IntlFormatLocaleOptions {
|
||||
* const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456))
|
||||
* //=> 10/4/2019
|
||||
*/
|
||||
export declare function intlFormat<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
): string;
|
||||
export declare function intlFormat(date: DateArg<Date> & {}): string;
|
||||
/**
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to format
|
||||
* @param localeOptions - An object with locale
|
||||
*
|
||||
@@ -59,13 +57,11 @@ export declare function intlFormat<DateType extends Date>(
|
||||
* })
|
||||
* //=> 2019. 10. 4.
|
||||
*/
|
||||
export declare function intlFormat<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
export declare function intlFormat(
|
||||
date: DateArg<Date> & {},
|
||||
localeOptions: IntlFormatLocaleOptions,
|
||||
): string;
|
||||
/**
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to format
|
||||
* @param formatOptions - The format options
|
||||
*
|
||||
@@ -84,13 +80,11 @@ export declare function intlFormat<DateType extends Date>(
|
||||
* })
|
||||
* //=> 10/4/2019, 12 PM
|
||||
*/
|
||||
export declare function intlFormat<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
export declare function intlFormat(
|
||||
date: DateArg<Date> & {},
|
||||
formatOptions: IntlFormatFormatOptions,
|
||||
): string;
|
||||
/**
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to format
|
||||
* @param formatOptions - The format options
|
||||
* @param localeOptions - An object with locale
|
||||
@@ -112,8 +106,8 @@ export declare function intlFormat<DateType extends Date>(
|
||||
* })
|
||||
* //=> Freitag, 4. Oktober 2019
|
||||
*/
|
||||
export declare function intlFormat<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
export declare function intlFormat(
|
||||
date: DateArg<Date> & {},
|
||||
formatOptions: IntlFormatFormatOptions,
|
||||
localeOptions: IntlFormatLocaleOptions,
|
||||
): string;
|
||||
|
||||
Reference in New Issue
Block a user