new Date() is working in Chrome but not Firefox
This is the way of instantiate a date object. Try this code example,
new Date() // current date and time new Date(milliseconds) //milliseconds since 1970/01/01 new Date(dateString) new Date(year, month, day, hours, minutes, seconds, milliseconds)
Try this also,
d1 = new Date("October 13, 1975 11:13:00") d2 = new Date(79,5,24) d3 = new Date(79,5,24,11,33,0)
The EMCAScript specification need the exact one date format.But it custom date formats may be freely supported by an implementation: “In case the String are not confirm to that format the function may fall back to any implementation-specific heuristics .The implementation-specific date format are different in chrome and FF.