AS3.0 Date类

var date1:Date = new Date("2013/01/01 12:00");

var date2:Date = new Date("2010/10/8 22:40");

//var num:uint = date2.getTime() - date1.getTime();

//var aday:uint = 1000 * 60 * 60 * 24;

trace (date1.getTime());

trace (date2);

//trace (num/aday);



//减法修改时间

/*var date1:Date = new Date("2010/10/4 22:40");

var date2:Date=new Date(date1.getTime()-1000*60*60*24*10)

trace(date1)

trace(date2.toLocaleDateString())*/



//加法修改时间

/*var date1:Date = new Date("2010/10/4 22:40");

var date2:Date=new Date(date1.getTime()+1000*60*60*24*10)

trace(date1)

trace(date2.toLocaleDateString())*/
 

你可能感兴趣的:(Date)