Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
toISOString shouldn't return "Invalid Date" when called on a invalid moment #3632
Because ISO dates are typically not used for direct human consumption and rather as a data interchange format, returning the string "Invalid Date" isn't very useful. Throwing a RangeError (which the native JS date object does) or returning null or would be more useful.
Description of the Issue and Steps to Reproduce:
Chrome on Fedora