boblauer / dateonly

A JavaScript class that stores a date without a time.
Apache License 2.0
6 stars 4 forks source link

Issue with date Conversion #2

Closed unkn0wn-kgb closed 8 years ago

unkn0wn-kgb commented 8 years ago

Hi there,

I think I discovered a serious issue with date conversion here is an example:

console.log(new DateOnly(20160101).toDate()) //Mon Feb 01 2016 00:00:00 GMT+1300 (NZDT) - Correct

Now we change year to 2017 console.log(new DateOnly(20170101).toDate()) //Wed Mar 01 2017 00:00:00 GMT+1300 (NZDT) - Not correct

So I'm not sure if you aware of this but if you could shine some light on why it works this way would be much appreciated.

Thanks

boblauer commented 8 years ago

Thanks, this is now fixed and published on npm @1.1.1.