According to MDN, we can pass only the following types of parameters to Date constructor:
new Date(); new Date(value); // Unix timestamp new Date(dateString); new Date(year, monthIndex [, day [, hours [, minutes [, seconds [, milliseconds]]]]]); So technically, we can't pass another Date instance to the Date constructor.
However, the following works fine in Firefox and Chrome:
new Date(new Date(1990, 1, 1)); Why does it work? Is this a correct way to clone Date objects?