Open nmccready opened 10 years ago
Actually do not use core it is different then https://datejs.googlecode.com/svn/trunk/build/date-en-US.js . good lord
@nmccready The reason I created this module was because mongoose.js was having trouble with the functions toObject
and toJson
, but that was fixed more than a year ago.
I'd recommend using the original DateJS
I only suggest trying the trunk, as it doesn't break d3.js . But then again your library would solve that.
allright, you mind sending a pull request with trunk source code and bumping the major version if there are breaking changes? I can publish to NPM once I merge your pull request.
Actually b4 doing any of that I suggest you add a test suite of minimal functionality that it must pass. One difference is getMonth is now 0 based where it was in 2007 1 based.
would you add that to test.js? It's based on Vows.js so it should be very straightforward.
Ok I'll try to get around to this. So the difference in getMonth is that it no longer overrides the browser's getMonth() same with now() . now() was what breaks d3 . Also d3 has references to getMonth() as well, so this probably keeps d3 ok as well.
When I say override getMonth() and now() are no longer created in date.js on the trunk.
There is wide confusion that the 2007 build was the latest code base. However a cdn provides the actual trunk.
You may want to include the trunk instead.
https://github.com/mbostock/d3/issues/1302 https://code.google.com/p/datejs/source/browse/trunk/src/core.js https://code.google.com/p/datejs/source/browse/trunk/build/core.js