-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
What type of issue is this?
Incorrect support data (example: BrowserX says "86" but support was added in "40")
What information was incorrect, unhelpful, or incomplete?
The data currently says Intl.DurationFormat
isn't available in NodeJs.
What browsers does this problem apply to, if applicable?
No response
What did you expect to see?
That this feature is available in version v23.0.0
Did you test this? If so, how?
I ran Intl.DurationFormat Node.Js in the terminal.
Welcome to Node.js v23.0.0.
Type ".help" for more information.
> const duration = {hours: 1, minutes: 46, seconds: 40 };
undefined
> console.log(duration)
{ hours: 1, minutes: 46, seconds: 40 }
undefined
> new Intl.DurationFormat("fr-FR", { style: "long" }).format(duration);
'1 heure, 46 minutes et 40 secondes'
>
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
>
However when I ran it in the earlier version I a error, so I'm pretty sure it's version v23.0.0..
Welcome to Node.js v22.14.0.
Type ".help" for more information.
> const duration = {hours: 1, minutes: 46, seconds: 40 };
undefined
> new Intl.DurationFormat("fr-FR", { style: "long" }).format(duration);
Uncaught TypeError: Intl.DurationFormat is not a constructor
> exit
Uncaught ReferenceError: exit is not defined
>
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
>
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat
If we look at this NodeJS issue, we can see someone else has run into the issue of believing NodeJS doesn't support this feature before closing the issue once they've discovered it in version 30.
I believe this pull request is relevant.
Do you have anything more you want to share?
I'll be happy to create the pull request to update the data for this if you wish :)
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat
MDN metadata
MDN page report details
- Query:
javascript.builtins.Intl.DurationFormat
- Report started: 2025-03-18T12:32:39.593Z