Reputation: 407
I can't manage to find what the source is for the JavaScript Date()
method.
Upvotes: 0
Views: 128
Reputation: 32222
When Date is called as a function rather than as a constructor, it returns a String representing the current time (UTC).
Additionally, if you call the Date
function as a constructor, it says:
...the time value (UTC) identifying the current time
So in both cases, the specification says "the current time". It is up to the implementer (ie the browser) how it determines what "the current time" is, but it's usually driven by the time upon the device it is running.
Upvotes: 5