Skip to content

fix: treat digit-only strings of 9+ chars as invalid (#2955)#3124

Open
prasanthmaran wants to merge 1 commit into
iamkun:devfrom
prasanthmaran:fix/numeric-string-parse-2955
Open

fix: treat digit-only strings of 9+ chars as invalid (#2955)#3124
prasanthmaran wants to merge 1 commit into
iamkun:devfrom
prasanthmaran:fix/numeric-string-parse-2955

Conversation

@prasanthmaran

Copy link
Copy Markdown

A ms timestamp passed as a string ('1762232987879') matched the date
regex and parsed as year 1762, but still reported isValid() true.
String input is documented as ISO 8601, so let these fall through to
the Date constructor and return Invalid Date, same as moment.

A ms timestamp passed as a string ('1762232987879') matched the date
regex and parsed as year 1762, but still reported isValid() true.
String input is documented as ISO 8601, so let these fall through to
the Date constructor and return Invalid Date, same as moment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants