8000 Add moment.fn.isValid · Issue #303 · moment/moment · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add moment.fn.isValid #303

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

Closed
timrwood opened this issue May 4, 2012 · 1 comment
Closed

Add moment.fn.isValid #303

timrwood opened this issue May 4, 2012 · 1 comment

Comments

@timrwood
Copy link
Member
timrwood commented May 4, 2012

See #235. Possible implementation below. Would need to add a flag or something when parsing, maybe in dateFromArray()?

moment.fn.isValid = function() {
    return !!this._isValid && !!this._d && !isNaN(this._d.getTime());
}
@timrwood
Copy link
Member Author

Tracking in #306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0