8000 Merge pull request #4557 from gwicksted/patch-1 · DINKIN/TypeScript@3c56825 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c56825

Browse files
committed
Merge pull request microsoft#4557 from gwicksted/patch-1
Add parameters to toLocaleDateString
1 parent 0913f07 commit 3c56825

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

src/lib/intl.d.ts

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ declare module Intl {
8888
timeZoneName?: string;
8989
formatMatcher?: string;
9090
hour12?: boolean;
91+
timeZone?: string;
9192
}
9293

9394
interface ResolvedDateTimeFormatOptions {
@@ -157,17 +158,44 @@ interface Number {
157158

158159
interface Date {
159160
/**
160-
* Converts a date to a string by using the current or specified locale.
161+
* Converts a date and time to a string by using the current or specified locale.
161162
* @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.
162163
* @param options An object that contains one or more properties that specify comparison options.
163164
*/
164165
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
165-
166166
/**
167167
* Converts a date to a string by using the current or specified locale.
168+
* @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.
169+
* @param options An object that contains one or more properties that specify comparison options.
170+
*/
171+
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
172+
173+
/**
174+
* Converts a time to a string by using the current or specified locale.
175+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
176+
* @param options An object that contains one or more properties that specify comparison options.
177+
*/
178+
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
179+
180+
/**
181+
* Converts a date and time to a string by using the current or specified locale.
168182
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
169183
* @param options An object that contains one or more properties that specify comparison options.
170184
*/
171185
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
186+
187+
/**
188+
* Converts a date to a string by using the current or specified locale.
189+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
190+
* @param options An object that contains one or more properties that specify comparison options.
191+
*/
192+
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
193+
194+
/**
195+
* Converts a time to a string by using the current or specified locale.
196+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
197+
* @param options An object that contains one or more properties that specify comparison options.
198+
*/
199+
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
172200
}
173201

0 commit comments

Comments
 (0)
0