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

[GR-60239] Implement Intl.DurationFormat #873

Open
woess opened this issue Dec 4, 2024 · 0 comments
Open

[GR-60239] Implement Intl.DurationFormat #873

woess opened this issue Dec 4, 2024 · 0 comments
Assignees

Comments

@woess
Copy link
Member

woess commented Dec 4, 2024

TL;DR

We plan to implement the Proposal for Intl.DurationFormat in GraalJS.

Details

  • Time Duration is how long something lasts, from the start to end. It can be represented by a single time unit or multiple ones.
    • For example,
      • 10000 seconds
      • 2 hours 46 minutes 40 seconds
  • Every locale has its own way to format duration.
    • For example:
      • en-US: 1 hour, 46 minutes and 40 seconds
      • fr-FR: 1 heure, 46 minutes et 40 secondes
  • There are multiple widths for the time duration.
    • For example, wide and short
      • 1 hour, 46 minutes and 40 seconds → Wide
      • 1 hr, 46 min, 40 sec → Short
new Intl.DurationFormat("fr-FR", { style: "long" }).format({
    hours: 1,
    minutes: 46,
    seconds: 40,
});
// => "1 heure, 46 minutes et 40 secondes"
@woess woess added this to the Planned for the Future milestone Dec 4, 2024
@woess woess moved this to Todo in GraalJS Roadmap Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants