Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fractionalSecondDigits
0
My compilation target is es2016 and my lib is es2021.
es2016
es2021
fractionalSecondDigits in Intl.DateTimeFormatOptions should not have 0. However current type definition is fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined;. https://github.com/microsoft/TypeScript/blob/v4.6.4/src/lib/es2021.intl.d.ts
fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined;
Intl.DateTimeFormat("en-US", { fractionalSecondDigits: 0 }); // RangeError: fractionalSecondDigits value is out of range.
This code throws RangeError on Chrome v101, Safari v15.4, Firefox v99 and Node.js v16,v17.
fractionalSecondDigits values are 1, 2 or 3 in ECMAScript® 2021 Internationalization API Specification. https://402.ecma-international.org/8.0/#sec-datetimeformat-abstracts
Related conversation at tc39/ecma402#590
The text was updated successfully, but these errors were encountered:
No branches or pull requests
lib Update Request
Configuration Check
My compilation target is
es2016and my lib ises2021.Missing / Incorrect Definition
fractionalSecondDigitsin Intl.DateTimeFormatOptions should not have0.However current type definition is
fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined;.https://github.com/microsoft/TypeScript/blob/v4.6.4/src/lib/es2021.intl.d.ts
Sample Code
This code throws RangeError on Chrome v101, Safari v15.4, Firefox v99 and Node.js v16,v17.
Documentation Link
fractionalSecondDigitsvalues are 1, 2 or 3 in ECMAScript® 2021 Internationalization API Specification.https://402.ecma-international.org/8.0/#sec-datetimeformat-abstracts
Related conversation at tc39/ecma402#590
The text was updated successfully, but these errors were encountered: