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

fix: unix epoc bug in date parser #655

Merged
merged 1 commit into from
Oct 16, 2019
Merged

fix: unix epoc bug in date parser #655

merged 1 commit into from
Oct 16, 2019

Conversation

privateOmega
Copy link
Contributor

@privateOmega privateOmega commented Oct 15, 2019

Hopefully this fixes #234 and doesn't introduce any new buggy conditions.

I have modified return value ? new Date(value) : invalidDate; to return value > -1 ? new Date(value) : invalidDate; keeping in mind any valid values will be greater than -1, (i.e 0 or above) and the invalid value like NaN doesn't satisfy > -1 condition.

@jquense
Copy link
Owner

jquense commented Oct 16, 2019

awesome thanks!

@jquense jquense merged commit 0d14827 into jquense:master Oct 16, 2019
@brandon-leapyear
Copy link

brandon-leapyear commented Dec 31, 2019

This is an old work account. Please reference @brandonchinn178 for all future communication


FYI this breaks all dates before the epoch now #731

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.

Date 1970-01-01T00:00:00Z is not validating.
3 participants