Core objects

Date object

In this lesson you will familiarize yourself with several Flash intrinsic objects – those which are supplied with Flash as a part of ActionScript Language for the convenience of the programmer.

The first object you will learn about is Date

Date object is traditional for most computer languages. It is used to record, keep, format and display an information about date and time. Date object includes numerous methods which may be separated into two groups – Set and Get methods. As it can be presumed from the names, get methods are reading date and time from the existing Date objects, while set methods are writing (updating) date and time values for the Date objects.

When new Date object is newly created it is assigned the value of date and time from computer timer. Information is kept in milliseconds relative to local time and may be transferred to UTC (Greenwich) time if the time zone is installed correctly on the computer.

Let's create a small example.

Next