Making a Date Based on Year or Month : Date : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Date »

 

Making a Date Based on Year or Month


 

Parameter      Value Range 
year           0-9999 and up, ?01 and down 
month          to 11 
date           to 31 
hour           to 23 
minute         to 59 
second         to 59 
millisecond    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(20065);
        trace(dSometime1.toString());
        var dSometime2:Date = new Date(2006515);
        trace(dSometime2.toString());
        var dSometime3:Date = new Date(20065156);
        trace(dSometime3.toString());
        var dSometime4:Date = new Date(2006515655);
        trace(dSometime4.toString());
        var dSometime5:Date = new Date(200651565533);
        trace(dSometime5.toString());
        var dSometime6:Date = new Date(20065156553324);
        trace(dSometime6.toString());
        

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Development
» Date