heapsource / safe_datejs

Safe(Node.js isolated) wrapper around http://www.datejs.com/
http://www.datejs.com/
7 stars 0 forks source link

The code base is not the latest date.js #4

Open nmccready opened 10 years ago

nmccready commented 10 years ago

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

nmccready commented 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

bithavoc commented 10 years ago

@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

nmccready commented 10 years ago

I only suggest trying the trunk, as it doesn't break d3.js . But then again your library would solve that.

bithavoc commented 10 years ago

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.

nmccready commented 10 years ago

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.

bithavoc commented 10 years ago

would you add that to test.js? It's based on Vows.js so it should be very straightforward.

nmccready commented 10 years ago

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.