We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
moment()
Currently there doesn't seem to be any straight forward method of determining whether a moment() is valid or not (ex, because a parse failed).
Various methods (ex, isNaN(+moment("asdf"))) work, but it would be nice if there was a documented right way to do this.
isNaN(+moment("asdf"))
I would propose:
moment.fn.valid = function() { return isNaN(+this); }
But there is no doubt a better way.
The text was updated successfully, but these errors were encountered:
Check out the discussion on #235
Sorry, something went wrong.
No branches or pull requests
Currently there doesn't seem to be any straight forward method of determining whether a
moment()
is valid or not (ex, because a parse failed).Various methods (ex,
isNaN(+moment("asdf"))
) work, but it would be nice if there was a documented right way to do this.I would propose:
But there is no doubt a better way.
The text was updated successfully, but these errors were encountered: