My date ordering using getTime() method sometimes doesn't work well, so I looked for an error and this is what I found:
new Date(2011, 1, 31, 9, 43, 0, 0).getTime() returns 1299141780000
new Date(2011, 2, 1, 14, 41, 0, 0).getTime() returns 1298986860000
This is obviously wrong. 1/2 is day after 31/1, but 31/1 gets a higher time stamp.
PHP function date("r", 1299141780000 * 0.001) returns "Thu, 03 Mar 2011 09:43:00 +0100" so here is problem. Time stamp for 31/1 gains 3 days. It looks like a serious JavaScript bug. Did someone solve it?
Bookmarks