Use an array of the proper names to translate directly : Date : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Date »

 

Use an array of the proper names to translate directly


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var timeOfWriting:Date = new Date(200702814364216);

        var daysOfWeek:Array = ["Sunday""Monday""Tuesday",
                                "Wednesday""Thursday",
                                "Friday""Saturday"];
        trace(daysOfWeek[timeOfWriting.day]);

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Development
» Date