Skip to content

Commit afe9619

Browse files
committed
fix(40806): Add missing options and possible values of DateTimeFormat
1 parent 69143ec commit afe9619

File tree

2 files changed

+38
-24
lines changed

2 files changed

+38
-24
lines changed

src/lib/es5.d.ts

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4318,19 +4318,26 @@ declare namespace Intl {
43184318
};
43194319

43204320
interface DateTimeFormatOptions {
4321-
localeMatcher?: string;
4322-
weekday?: string;
4323-
era?: string;
4324-
year?: string;
4325-
month?: string;
4326-
day?: string;
4327-
hour?: string;
4328-
minute?: string;
4329-
second?: string;
4330-
timeZoneName?: string;
4331-
formatMatcher?: string;
4332-
hour12?: boolean;
4321+
dateStyle?: "full" | "long" | "medium" | "short";
4322+
timeStyle?: "full" | "long" | "medium" | "short";
4323+
calendar?: "buddhist" | "chinese" | " coptic" | "ethiopia" | "ethiopic" | "gregory" | " hebrew" | "indian" | "islamic" | "iso8601" | " japanese" | "persian" | "roc";
4324+
dayPeriod?: "narrow" | "short" | " long";
4325+
numberingSystem?: "arab" | "arabext" | " bali" | "beng" | "deva" | "fullwide" | " gujr" | "guru" | "hanidec" | "khmr" | " knda" | "laoo" | "latn" | "limb" | "mlym" | " mong" | "mymr" | "orya" | "tamldec" | " telu" | "thai" | "tibt";
4326+
localeMatcher?: "best fit" | "lookup";
43334327
timeZone?: string;
4328+
hour12?: boolean;
4329+
hourCycle?: "h11" | "h12" | "h23" | "h24";
4330+
formatMatcher?: "best fit" | "basic";
4331+
weekday?: "long" | "short" | "narrow";
4332+
era?: "long" | "short" | "narrow";
4333+
year?: "numeric" | "2-digit";
4334+
month?: "numeric" | "2-digit" | "long" | "short" | "narrow";
4335+
day?: "numeric" | "2-digit";
4336+
hour?: "numeric" | "2-digit";
4337+
minute?: "numeric" | "2-digit";
4338+
second?: "numeric" | "2-digit";
4339+
fractionalSecondDigits?: 0 | 1 | 2 | 3;
4340+
timeZoneName?: "long" | "short";
43344341
}
43354342

43364343
interface ResolvedDateTimeFormatOptions {

tests/lib/lib.d.ts

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,19 +3938,26 @@ declare module Intl {
39383938
}
39393939

39403940
interface DateTimeFormatOptions {
3941-
localeMatcher?: string;
3942-
weekday?: string;
3943-
era?: string;
3944-
year?: string;
3945-
month?: string;
3946-
day?: string;
3947-
hour?: string;
3948-
minute?: string;
3949-
second?: string;
3950-
timeZoneName?: string;
3951-
formatMatcher?: string;
3952-
hour12?: boolean;
3941+
dateStyle?: "full" | "long" | "medium" | "short";
3942+
timeStyle?: "full" | "long" | "medium" | "short";
3943+
calendar?: "buddhist" | "chinese" | " coptic" | "ethiopia" | "ethiopic" | "gregory" | " hebrew" | "indian" | "islamic" | "iso8601" | " japanese" | "persian" | "roc";
3944+
dayPeriod?: "narrow" | "short" | " long";
3945+
numberingSystem?: "arab" | "arabext" | " bali" | "beng" | "deva" | "fullwide" | " gujr" | "guru" | "hanidec" | "khmr" | " knda" | "laoo" | "latn" | "limb" | "mlym" | " mong" | "mymr" | "orya" | "tamldec" | " telu" | "thai" | "tibt";
3946+
localeMatcher?: "best fit" | "lookup";
39533947
timeZone?: string;
3948+
hour12?: boolean;
3949+
hourCycle?: "h11" | "h12" | "h23" | "h24";
3950+
formatMatcher?: "best fit" | "basic";
3951+
weekday?: "long" | "short" | "narrow";
3952+
era?: "long" | "short" | "narrow";
3953+
year?: "numeric" | "2-digit";
3954+
month?: "numeric" | "2-digit" |"long" | "short" | "narrow";
3955+
day?: "numeric" | "2-digit";
3956+
hour?: "numeric" | "2-digit";
3957+
minute?: "numeric" | "2-digit";
3958+
second?: "numeric" | "2-digit";
3959+
fractionalSecondDigits?: 0 | 1 | 2 | 3;
3960+
timeZoneName?: "long" | "short";
39543961
}
39553962

39563963
interface ResolvedDateTimeFormatOptions {

0 commit comments

Comments
 (0)