mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 17:41:26 -06:00
fix(40806): Add missing options and possible values of DateTimeFormat (#41880)
This commit is contained in:
parent
a2ddfcfe0e
commit
bce412cb15
23
src/lib/es2020.intl.d.ts
vendored
23
src/lib/es2020.intl.d.ts
vendored
@ -277,4 +277,27 @@ declare namespace Intl {
|
||||
unit?: string;
|
||||
unitDisplay?: string;
|
||||
}
|
||||
|
||||
interface DateTimeFormatOptions {
|
||||
dateStyle?: "full" | "long" | "medium" | "short";
|
||||
timeStyle?: "full" | "long" | "medium" | "short";
|
||||
calendar?: "buddhist" | "chinese" | " coptic" | "ethiopia" | "ethiopic" | "gregory" | " hebrew" | "indian" | "islamic" | "iso8601" | " japanese" | "persian" | "roc";
|
||||
dayPeriod?: "narrow" | "short" | " long";
|
||||
numberingSystem?: "arab" | "arabext" | " bali" | "beng" | "deva" | "fullwide" | " gujr" | "guru" | "hanidec" | "khmr" | " knda" | "laoo" | "latn" | "limb" | "mlym" | " mong" | "mymr" | "orya" | "tamldec" | " telu" | "thai" | "tibt";
|
||||
localeMatcher?: "best fit" | "lookup";
|
||||
timeZone?: string;
|
||||
hour12?: boolean;
|
||||
hourCycle?: "h11" | "h12" | "h23" | "h24";
|
||||
formatMatcher?: "best fit" | "basic";
|
||||
weekday?: "long" | "short" | "narrow";
|
||||
era?: "long" | "short" | "narrow";
|
||||
year?: "numeric" | "2-digit";
|
||||
month?: "numeric" | "2-digit" | "long" | "short" | "narrow";
|
||||
day?: "numeric" | "2-digit";
|
||||
hour?: "numeric" | "2-digit";
|
||||
minute?: "numeric" | "2-digit";
|
||||
second?: "numeric" | "2-digit";
|
||||
fractionalSecondDigits?: 0 | 1 | 2 | 3;
|
||||
timeZoneName?: "long" | "short";
|
||||
}
|
||||
}
|
||||
|
||||
31
tests/lib/lib.d.ts
vendored
31
tests/lib/lib.d.ts
vendored
@ -3938,19 +3938,26 @@ declare module Intl {
|
||||
}
|
||||
|
||||
interface DateTimeFormatOptions {
|
||||
localeMatcher?: string;
|
||||
weekday?: string;
|
||||
era?: string;
|
||||
year?: string;
|
||||
month?: string;
|
||||
day?: string;
|
||||
hour?: string;
|
||||
minute?: string;
|
||||
second?: string;
|
||||
timeZoneName?: string;
|
||||
formatMatcher?: string;
|
||||
hour12?: boolean;
|
||||
dateStyle?: "full" | "long" | "medium" | "short";
|
||||
timeStyle?: "full" | "long" | "medium" | "short";
|
||||
calendar?: "buddhist" | "chinese" | " coptic" | "ethiopia" | "ethiopic" | "gregory" | " hebrew" | "indian" | "islamic" | "iso8601" | " japanese" | "persian" | "roc";
|
||||
dayPeriod?: "narrow" | "short" | " long";
|
||||
numberingSystem?: "arab" | "arabext" | " bali" | "beng" | "deva" | "fullwide" | " gujr" | "guru" | "hanidec" | "khmr" | " knda" | "laoo" | "latn" | "limb" | "mlym" | " mong" | "mymr" | "orya" | "tamldec" | " telu" | "thai" | "tibt";
|
||||
localeMatcher?: "best fit" | "lookup";
|
||||
timeZone?: string;
|
||||
hour12?: boolean;
|
||||
hourCycle?: "h11" | "h12" | "h23" | "h24";
|
||||
formatMatcher?: "best fit" | "basic";
|
||||
weekday?: "long" | "short" | "narrow";
|
||||
era?: "long" | "short" | "narrow";
|
||||
year?: "numeric" | "2-digit";
|
||||
month?: "numeric" | "2-digit" |"long" | "short" | "narrow";
|
||||
day?: "numeric" | "2-digit";
|
||||
hour?: "numeric" | "2-digit";
|
||||
minute?: "numeric" | "2-digit";
|
||||
second?: "numeric" | "2-digit";
|
||||
fractionalSecondDigits?: 0 | 1 | 2 | 3;
|
||||
timeZoneName?: "long" | "short";
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user