Call getter method of Date object : Date : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Date »

 

Call getter method of Date object


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var dOriginal:Date = new Date();
        var nYear:Number = dOriginal.getFullYear();
        var nMonth:Number = dOriginal.getMonth();
        var nDate:Number = dOriginal.getDate();
        var nHour:Number = dOriginal.getHours();
        var nMinute:Number = dOriginal.getMinutes();
        var nSecond:Number = dOriginal.getSeconds();
        var nMillisecond:Number = dOriginal.getMilliseconds();
        var dCopy:Date = new Date(nYear, nMonth, nDate, nHour, nMinute,nSecond, nMillisecond);
        
        trace(dCopy);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» Date