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

Chapter 11. Manipulating Information > Using the Date and Time

Using the Date and Time

The Date object lets you retrieve the local or universal (GMT) date and time information from the clock in your viewer's computer system. Using the Date object, you can retrieve the year, month, date, day of the week, hour, minute, second, and millisecond. Use the Date object and its methods to create accurate clocks in your movie or to find information about certain days and dates in the past. For example, you can create a date object for your birthday by specifying the month, date, and year. Using methods of the Date object, you can retrieve the day of the week for your date object that tells you what day you were born.

The Date object first needs to be instantiated with the constructor function new Date. Then you can call on its methods to retrieve specific time information. The common methods for retrieving the dates and times are summarized in Table 11.3.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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