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

Unimplemented DateTimeFormat.formatToParts() #597

Open
duonglaiquang opened this issue May 24, 2023 · 3 comments
Open

Unimplemented DateTimeFormat.formatToParts() #597

duonglaiquang opened this issue May 24, 2023 · 3 comments
Labels
enhancement New feature or request js-engine Issues related to the js engine

Comments

@duonglaiquang
Copy link
Contributor

Problem in brief

Implementation of DateTimeFormat.formatToParts() is missing.

Details

Any attempt to add this method will likely need to look at the implementation of options which the DateTimeFormat constructor currently ignores.

options is most likely integral to the implementation DateTimeFormat.formatToParts() and as such fixing this issue will probably be involved.

Supporting options will also affect DateTimeFormat.format().

Here is a possible test for the latter:

var options = {
  weekday: "long",
  year: "numeric",
  month: "long",
  day: "numeric",
};
var dateTimeFormat = new Intl.DateTimeFormat("en-US", options);

// Chrome: Wednesday, May 24, 2023
// HtmlUnit: 05/24/2023
console.log(dateTimeFormat.format(new Date()));
@rbri
Copy link
Member

rbri commented May 25, 2023

As always... PR's are welcome

@rbri
Copy link
Member

rbri commented Jun 5, 2023

https://github.com/anba/es6draft has a working impl, maybe we can have a look at this

@rbri rbri added enhancement New feature or request js-engine Issues related to the js engine labels Mar 27, 2024
@rbri
Copy link
Member

rbri commented Mar 27, 2024

will be hopefully solved as part of #755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request js-engine Issues related to the js engine
Projects
None yet
Development

No branches or pull requests

2 participants