User Guide
Date.getMilliseconds() 265
Returns
An integer.
Description
Method; returns the hour (an integer from 0 to 23) of the specified Date object, according
to local time. Local time is determined by the operating system on which Flash Player is running.
Example
The following example uses the constructor to create a Date object based on the current time and
uses the
getHours() method to display hour values from that object:
var my_date:Date = new Date();
trace(my_date.getHours());
var my_date:Date = new Date();
var hourObj:Object = getHoursAmPm(my_date.getHours());
trace(hourObj.hours);
trace(hourObj.ampm);
function getHoursAmPm(hour24:Number):Object {
var returnObj:Object = new Object();
returnObj.ampm = (hour24<12) ? "AM" : "PM";
var hour12:Number = hour24%12;
if (hour12 == 0) {
hour12 = 12;
}
returnObj.hours = hour12;
return returnObj;
}
Date.getMilliseconds()
Availability
Flash Player 5.
Usage
my_date.getMilliseconds() : Number
Parameters
None.
Returns
An integer.
Description
Method; returns the milliseconds (an integer from 0 to 999) of the specified Date object,
according to local time. Local time is determined by the operating system on which Flash Player is
running.