From the specs:
When
Date
is called as a function rather than as a constructor, it returns a String representing the current time (UTC).
and:
When
Date
is called as part of anew
expression, it is a constructor: it initialises the newly created object.
So, new Date(...)
returns an object such that obj instanceof Date
is true, whereas Date(...)
basically returns the same as new Date().toString()
.