Üye Kayıt Üye Giriş

Tarih örneği


Tarih örneği

 
var now:Date = new Date();
 
trace("date   :" + now.getDate()); // 19
 
var monthLabels:Array = new Array("January",
                  "February",
                  "March",
                  "April",
                  "May",
                  "June",
                  "July",
                  "August",
                  "September",
                  "October",
                  "November",
                  "December");
 
 
trace("month  :" + now.getMonth()); // 1
trace("month  :" + monthLabels[now.getMonth()]); //February
 
trace("year   :" + now.getUTCFullYear()); // 2010
 
var weekDayLabels:Array = new Array("Sunday",
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday",
                    "Saturday");
 
trace("day    :" + now.getDay());            // 5
trace("day    :" + weekDayLabels[now.getDay()]); // Friday
 
trace("time   :" + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds()); // 6:39:57
 
 
Bilgisayar Dershanesi Ders Sahibi;
Bilgisayar Dershanesi

Yorumlar

Yorum Yapabilmek İçin Üye Girişi Yapmanız Gerekmektedir.

ETİKETLER