0

Possible Duplicate:
Difference between Date(dateString) and new Date(dateString)

What is the difference between

Date(1356567322705)
"Thu Dec 27 2012 03:13:37 GMT+0300 (Kaliningrad Standard Time)"

and

new Date(1356567322705)
Thu Dec 27 2012 03:15:22 GMT+0300 (Kaliningrad Standard Time)

and why there is a gap of about 2 minutes?

Community
  • 1
  • 1
Sergey Metlov
  • 25,747
  • 28
  • 93
  • 153

1 Answers1

1

Note: Note that JavaScript Date objects can only be instantiated by calling JavaScript Date as a constructor: calling it as a regular function (i.e. without the new operator) will return a string rather than a Date object; unlike other JavaScript object types, JavaScript Date objects have no literal syntax.

-- Mozilla Developer Network

Amadan
  • 191,408
  • 23
  • 240
  • 301