-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
I had to downgrade a project from running on Node 18 - 22 to Node 16 for reasons not related to date-fns, and it cost me a bit of debugging time to understand that my date calculations are not wrong, @date-fns/tz is not actually compatible with Node 16:
$ node
Welcome to Node.js v16.17.0.
Type ".help" for more information.
> const { TZDateMini } = require('@date-fns/tz/date/mini');
undefined
> new TZDateMini(Date.now())
TZDateMini Invalid Date { internal: Invalid Date }
Setting a requirement in package.json so I would be warned on install would be helpful:
"engines": {
"node": ">=18.0.0"
}
(I have not verified that 18.0.0 is indeed the minimum requirement)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Could