Closed shosokawa closed 10 years ago
When passing just the year, do we also get the same sort of inconsistent result?
I don't think so. Because in the case of one argument as Integer, it is processed as milliseconds.
Excellent, just want to avoid having even more special-casing in there. The code is pretty ugly as it is. Could you add a test for this along with your fix?
I added a test for the fix.
Date:
timezoneJS.Date:
I suppose that cause of this problem is reason why arguments are filled by 0 if arguments except tz are more than 1. It runs
new Date( 2011, 8, 0, 0...)
, that might benew Date( 2011, 8, 1, 0...)
for same result for Date.