トップ 一覧 検索 ヘルプ RSS ログイン

日付時間の取得_Flashの変更点

+!!!日付時間の取得
+
+ActionScriptで日付けと時間を取得するには、「Date」クラスを
+作成して、これのメソッドより「年・月・日」「時間・分・秒」を取得します。
+
+ t = new Date();
+ year  = t.getYear() + 1900;    //年の取得(西暦の場合は+1900する)
+ month = t.getMonth() + 1;      //月の取得(0〜11が返るので+1する)
+ day   = t.getDate();           //日の取得(1〜31)
+ 
+ h = t.getHours();    //時間の取得(0〜23)
+ m = t.getMinutes();  //分の取得(0〜59)
+ s = t.getSeconds();  //秒の取得(0〜59)