-
Notifications
You must be signed in to change notification settings - Fork 7k
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
overflowing moment seen as valid #5075
Labels
Comments
How did you use add method? I did not find method in moment object |
Alanscut
added a commit
to Alanscut/moment
that referenced
this issue
May 20, 2020
ichernev
pushed a commit
that referenced
this issue
Dec 23, 2023
ichernev
added a commit
that referenced
this issue
Dec 23, 2023
[bugfix] Fix issue #5075, Delete destructive judgment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Given a valid moment, subtract some massive duration from that moment. The moment declares that
isValid()==true
but gives "Invalid date" when converted to a string.To Reproduce
Expected behavior
If a moment is manipulated in such a way to make it overflow,
isValid
should returnfalse
.Desktop
OS: macOS (tested multiple browsers)
Browser Safari
Version 12.1
Browser Chrome
Version 73.0.3683.103
Moment-specific environment
Please run the following code in your environment and include the output:
The text was updated successfully, but these errors were encountered: