Skip to content
New issue

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

Intl.DateTimeFormat.formatToParts() does not include part of type fractionalSecond #48882

Open
jordanmbell opened this issue Apr 29, 2022 · 0 comments
Assignees
Labels
Bug Domain: lib.d.ts Good First Issue Help Wanted

Comments

@jordanmbell
Copy link

@jordanmbell jordanmbell commented Apr 29, 2022

lib Update Request

Configuration Check

My compilation target is esnext and my lib is the default.

Missing / Incorrect Definition

Intl.DateTimeFormat.prototype.formatToParts

Sample Code

new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond')

Documentation Link

Added in ECMAScript 2021: https://402.ecma-international.org/#sec-formatdatetimepattern

Also mentioned in MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts#description

jordanmbell added a commit to jordanmbell/TypeScript that referenced this issue Apr 29, 2022
This change adds the `fractionalSecond` part type as a valid part
to be returned from Intl.DateTimeFormat().formatToParts().

Fixes microsoft#48882
@andrewbranch andrewbranch added Domain: lib.d.ts Bug Help Wanted Good First Issue labels May 2, 2022
@andrewbranch andrewbranch added this to the TypeScript 4.8.0 milestone May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Domain: lib.d.ts Good First Issue Help Wanted
Projects
None yet
Development

No branches or pull requests

3 participants