Name
UTC() — NN 2 IE J1 ECMA 1
Synopsis
UTC(yyyy,mm,dd[,hh[,mm[,ss[,msecs]]]])
A static method of the Date object that returns a
numeric version of the date as stored internally by the browser for a
Date object. Unlike parameters to the
Date object constructor, the parameter values for
the UTC() method must be in UTC time for the
returned value to be accurate. This method does not generate a date
object, as the Date object constructor does.
Returned Value
Integer of the UTC millisecond value of the date specified as parameters.
Parameters
-
yyyy Four-digit year value.
-
mm Two-digit month number (0-11).
-
dd Two-digit date number (1-31).
-
hh Optional two-digit hour number in 24-hour time (0-23).
-
mm Optional two-digit minute number (0-59).
-
ss Optional two-digit second number (0-59).
-
msec Optional milliseconds past the last whole second (0-999).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access