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

moment iso date parsing difference between 2.10.3 and 2.10.5 #2512

Closed
timbell opened this issue Jul 27, 2015 · 4 comments
Closed

moment iso date parsing difference between 2.10.3 and 2.10.5 #2512

timbell opened this issue Jul 27, 2015 · 4 comments

Comments

@timbell
Copy link

timbell commented Jul 27, 2015

Hello,

Using 2.10.3 I was parsing likely ISO 8601 dates like this:

var m = moment(datestr, moment.ISO_8601);
if (m.isValid()) {
    ...

and things worked as expected when passing invalid dates. On updating to 2.10.5 this is no longer the case - I get an exception in the moment call. The exception is thrown here:

function Moment(config) {
    copyConfig(this, config);
    this._d = new Date(config._d.getTime());

because config._d is undefined.

Should I be doing things differently or is this a regression?

Jsfiddle showing the 2.10.3 behaviour here: http://jsfiddle.net/xnvofgrm/

Thanks,

Tim

@vsumner
Copy link

vsumner commented Jul 27, 2015

+1

1 similar comment
@ssimons12
Copy link

+1

@ichernev
Copy link
Contributor

I'll cut a new version today. Thanks for the report.

@ichernev
Copy link
Contributor

2.10.6 release. Sorry for the trouble.

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

5 participants