Parameter Value Range year 0-99, 99 and up, ?01 and down month 0 to 11 date 1 to 31 hour 0 to 23 minute 0 to 59 second 0 to 59 millisecond 0 to 999
package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){
var dSometime:Date = new Date(2006); trace(dSometime.toString()); var dSometime1:Date = new Date(2006, 5); trace(dSometime1.toString()); var dSometime2:Date = new Date(2006, 5, 15); trace(dSometime2.toString()); var dSometime3:Date = new Date(2006, 5, 15, 6); trace(dSometime3.toString()); var dSometime4:Date = new Date(2006, 5, 15, 6, 55); trace(dSometime4.toString()); var dSometime5:Date = new Date(2006, 5, 15, 6, 55, 33); trace(dSometime5.toString()); var dSometime6:Date = new Date(2006, 5, 15, 6, 55, 33, 24); trace(dSometime6.toString());
} } }
|