Title: Support `Temporal` across Node.js APIs · Issue #57891 · nodejs/node · GitHub
Open Graph Title: Support `Temporal` across Node.js APIs · Issue #57891 · nodejs/node
X Title: Support `Temporal` across Node.js APIs · Issue #57891 · nodejs/node
Description: The Temporal proposal is currently Stage 3, has in progress / experimental implementation in V8 (available in latest releases using --harmony-temporal), and is likely to be unflagged in Node.js once it's stable enough (refs: #57127, #571...
Open Graph Description: The Temporal proposal is currently Stage 3, has in progress / experimental implementation in V8 (available in latest releases using --harmony-temporal), and is likely to be unflagged in Node.js onc...
X Description: The Temporal proposal is currently Stage 3, has in progress / experimental implementation in V8 (available in latest releases using --harmony-temporal), and is likely to be unflagged in Node.js onc...
Opengraph URL: https://github.com/nodejs/node/issues/57891
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support `Temporal` across Node.js APIs","articleBody":"The [`Temporal` proposal](https://github.com/tc39/proposal-temporal) is currently Stage 3, has `in progress / experimental` implementation in V8 (available in latest releases using `--harmony-temporal`), and is likely to be unflagged in Node.js once it's stable enough (refs: https://github.com/nodejs/node/issues/57127, https://github.com/nodejs/node/pull/57128).\n\nIn light of this, I propose that Node.js begins supporting `Temporal` in the relevant APIs (mainly those that already work with `Date`s) after it becomes available by default without runtime flag.\n\nRelevant APIs:\n- [x] `fs`: `Stats` and `BigIntStats`\n Only bigint version provides nanosecond precision, and both provide lazy getters for `Date` instances. Adding lazy getters for `Temporal.Instant` would also make non-bigint version provide nanosecond precision.\n- [ ] `fs`: `utimes()`, `lutimes()`, `futimes()`, `utimesSync()`, `lutimesSync()`, `futimesSync()`, `promises.utimes()`, `promises.lutimes()`, `filehandle.utimes()`\n Accepts `atime` and `mtime` as `number`|`string`|`Date`, can support `Temporal.Instant` as well.\n Note: these functions also don't accept `bigint`s yet. In the Temporal API, `number`s are used for `epochTime`s in milliseconds while `bigint`s are used for nanoseconds. Adding direct support of `bigint`s might result a confusing API: some users might expect it to coerce type and behave exactly the same as `number`|`string`, some might expect it to be parsed as nanoseconds. Adding `Temporal` support would make it unambiguous.\n\nMaybe there are other APIs that can benefit from this, too?\ncc @nodejs/fs since it's only https://github.com/nodejs/node/labels/fs at the moment.\n\nInternal updates (if it happens to be more precise, more fast, or more readable), generic support (primordials, `util`, `assert`, etc.) and dependencies (for example, `undici.setCookie(, { expires })`) are out of scope here.","author":{"url":"https://github.com/LiviaMedeiros","@type":"Person","name":"LiviaMedeiros"},"datePublished":"2025-04-15T14:16:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/57891/node/issues/57891"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:105e6b85-0fbe-0dae-8651-ef40e236e125 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A08A:1C418C:1296C31:1AD6B4F:6A4CD966 |
| html-safe-nonce | 13a979f85335da2ce3232f0f1833a4af518263717d1c2936ab726687249c64fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDhBOjFDNDE4QzoxMjk2QzMxOjFBRDZCNEY6NkE0Q0Q5NjYiLCJ2aXNpdG9yX2lkIjoiMjg5MDM3MTcxMzMzNzE4NjY2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8ac9c95edd039eb6b5d4e84b0a05c8aa503dabd9ce89bec43d4f87fb7994016a |
| hovercard-subject-tag | issue:2996594606 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/57891/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95e2c1b14e8bb703207d9a3e1be3b13bca75f3af18c1151545d7303846adab31/nodejs/node/issues/57891 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95e2c1b14e8bb703207d9a3e1be3b13bca75f3af18c1151545d7303846adab31/nodejs/node/issues/57891 |
| og:image:alt | The Temporal proposal is currently Stage 3, has in progress / experimental implementation in V8 (available in latest releases using --harmony-temporal), and is likely to be unflagged in Node.js onc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LiviaMedeiros |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3eeb74f55ccd8a31bdaec6839577c592bbf7844c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width