Microsoft® JScript
UTC Method
See Also
Language Reference 


Description
Computes the number of milliseconds between midnight, January 1, 1970 UTC (or GMT) and the supplied date.
Syntax

Date.UTC( year, month, day, hours, minutes, seconds )

The UTC method syntax has these parts:

Part Description
year The year minus 1900. For example, specify 105 for the year 2005.
month The month as an integer between 0 and 11 (January and December).
day The day as an integer between 1 and 31.
hours Optional. Must be supplied if minutes is supplied. An integer from 0 to 23 (midnight to 11pm) that specifies the hour.
minutes Optional. Must be supplied if seconds is supplied. An integer from 0 to 59 that specifies the minutes.
seconds Optional. An integer from 0 to 59 that specifies the seconds.
Remarks

The UTC method returns the number of milliseconds between midnight, January 1, 1970 UTC (Universal Coordinated Time) and the supplied date. This return value can be used in the setTime method and in the Date object constructor.

The difference between the UTC method and the Date object constructor that accepts a date, is that the UTC method assumes UTC, and the Date object constructor assumes local time.

The UTC method is a static method. A Date object does not have to be created before it can be used.


© 1996 by Microsoft Corporation.


Casa de Bender