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

format functions must throw exceptions on attempt on processing invalid dates #987

kossnocorp opened this issue Nov 20, 2018 · 0 comments


Copy link

@kossnocorp kossnocorp commented Nov 20, 2018

See JavaScript's toISOString and Intl API for the reasoning:

const date = new Date()

//=> NaN

//=> NaN

//=> Invalid date

//=> RangeError: Invalid time value

new Intl.DateTimeFormat('en-US').format(date)
//=> RangeError: Invalid time value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.