Getyear (Date.getyear Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Returns
- An integer.
Number
Example
The following example creates a new Date object and uses
Date.getFullYear()
value returned by
Date.getFullYear()
depending on the relationship between your local time zone and universal time.
var today_date:Date = new Date();
trace(today_date.getFullYear()); // display based on local timezone
trace(today_date.getUTCFullYear()); // displays getYear() plus or minus 1

getYear (Date.getYear method)

public getYear() : Number
Returns the year of the specified Date object, according to local time. Local time is
determined by the operating system on which Flash Player is running. The year is the full year
minus 1900. For example, the year 2000 is represented as 100.
Availability: ActionScript 1.0; Flash Player 5
Returns
- An integer.
Number
Example
The following example creates a Date object with the month and year set to May 2004. The
method returns 104, and
Date.getYear()
var today_date:Date = new Date(2004,4);
trace(today_date.getYear()); // output: 104
trace(today_date.getFullYear()); // output: 2004
See also
getFullYear (Date.getFullYear method)
492
ActionScript classes
. The value returned by
if today's date is December 31 or January 1
Date.getUTCFullYear()
Date.getUTCFullYear()
Date.getFullYear()
and
may differ from the
,
returns 2004:

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents