• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Core Syntax > Date.UTC()

Date.UTC()

JavaScript 1.0+, ECMAScript 1.0+, JScript 1.0+ Nav2+, NES2+, IE 3+, Opera3+ Syntax

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

Description

Since the Date constructor creates new dates in local time, the UTC() method is provided to create dates in universal time (GMT). The method accepts arguments to allow you to set all aspects of a date and time, from the year to milliseconds. An integer, representing the number of milliseconds between midnight January 1, 1970 (GMT) to the date and time specified, is returned from the method. The integer can then be used to create a new Date object. The arguments and return value are in Table 6.25.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint