Add parameters to toLocaleDateString
Also added missing option in Intl.DateTimeFormatOptions (timeZone). Original ticket #4294
This commit is contained in:
parent
d0281f0e0e
commit
c209747c6a
17
src/lib/intl.d.ts
vendored
17
src/lib/intl.d.ts
vendored
|
@ -88,6 +88,7 @@ declare module Intl {
|
||||||
timeZoneName?: string;
|
timeZoneName?: string;
|
||||||
formatMatcher?: string;
|
formatMatcher?: string;
|
||||||
hour12?: boolean;
|
hour12?: boolean;
|
||||||
|
timeZone?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ResolvedDateTimeFormatOptions {
|
interface ResolvedDateTimeFormatOptions {
|
||||||
|
@ -157,17 +158,29 @@ interface Number {
|
||||||
|
|
||||||
interface Date {
|
interface Date {
|
||||||
/**
|
/**
|
||||||
* Converts a date to a string by using the current or specified locale.
|
* Converts a date and time to a string by using the current or specified locale.
|
||||||
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||||
* @param options An object that contains one or more properties that specify comparison options.
|
* @param options An object that contains one or more properties that specify comparison options.
|
||||||
*/
|
*/
|
||||||
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||||
|
/**
|
||||||
|
* Converts a date to a string by using the current or specified locale.
|
||||||
|
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||||
|
* @param options An object that contains one or more properties that specify comparison options.
|
||||||
|
*/
|
||||||
|
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a date and time to a string by using the current or specified locale.
|
||||||
|
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||||
|
* @param options An object that contains one or more properties that specify comparison options.
|
||||||
|
*/
|
||||||
|
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||||
/**
|
/**
|
||||||
* Converts a date to a string by using the current or specified locale.
|
* Converts a date to a string by using the current or specified locale.
|
||||||
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
|
||||||
* @param options An object that contains one or more properties that specify comparison options.
|
* @param options An object that contains one or more properties that specify comparison options.
|
||||||
*/
|
*/
|
||||||
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue