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

fromNow() returns invalid date if invalid #2091

Closed
wants to merge 1 commit into from

Conversation

donaldpcook
Copy link

@ichernev
Copy link
Contributor

Can you please add a test for that.

@ichernev ichernev added this to the 2.10 milestone Jan 17, 2015
if (!this.isValid()) {
return this.localeData().invalidDate();
}

return this.from(moment(), withoutSuffix);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this change just go in from and be propagated out of there? Two birds, one stone.

@ichernev
Copy link
Contributor

ichernev commented May 4, 2015

merged something similar in b0413fc

@ichernev ichernev closed this May 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants