Getseconds (Date.getseconds Method); Gettime (Date.gettime Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example uses the constructor to create a Date object based on the current time
and uses the
getMonth()
var my_date:Date = new Date();
trace(my_date.getMonth());
The following example uses the constructor to create a Date object based on the current time
and uses the
getMonth()
display the name of the month.
var my_date:Date = new Date();
trace(my_date.getMonth());
trace(getMonthAsString(my_date.getMonth()));
function getMonthAsString(month:Number):String {
var monthNames_array:Array = new Array("January", "February", "March",
"April", "May", "June", "July", "August", "September", "October",
"November", "December");
return monthNames_array[month];
}

getSeconds (Date.getSeconds method)

public getSeconds() : Number
Returns the seconds (an integer from 0 to 59) of the specified Date object, according to local
time. Local time is determined by the operating system on which Flash Player is running.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
- An integer.
Number
Example
The following example uses the constructor to create a Date object based on the current time
and uses the
getSeconds()
var my_date:Date = new Date();
trace(my_date.getSeconds());

getTime (Date.getTime method)

public getTime() : Number
Returns the number of milliseconds since midnight January 1, 1970, universal time, for the
specified Date object. Use this method to represent a specific instant in time when comparing
two or more Date objects.
method to return the month value from that object:
method to display the current month as a numeric value, and
method to return the seconds value from that object:
Date
337

Advertisement

Table of Contents
loading

Table of Contents