This function returns a string primitive representing the current UTC time value.
When the Date() constructor is called as a function rather than in a new expression, it returns a string representing the current time (in UTC time). Note that when calling it as a function the arguments are all ignored and it is not equivalent to calling the Date() constructor in a new expression at all.
Effectively, the function call to a Date() constructor behaves as if you had coded this fragment of JavaScript in the script source text:
(new Date()).toString()
ECMA 262 edition 2 - section - 15.1.3.7
ECMA 262 edition 2 - section - 15.9.2
ECMA 262 edition 3 - section - 15.9.2
Prev | Home | Next |
Date() | Up | Date.Class |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |