getDate (Date.getDate メソッド)

public getDate() : Number

指定された Date オブジェクトの日付 (1 ~ 31 の整数) をローカル時間で返します。ローカル時間は、Flash Player を実行しているオペレーティングシステムによって決まります。

対応バージョン : ActionScript 1.0、Flash Player 5

戻り値

Number - 整数。

次の例では、新しい Date オブジェクトを作成し、Date.getMonth()Date.getDate()、および Date.getFullYear() の戻り値を連結します。:

var today_date:Date = new Date();
var date_str:String = (today_date.getDate()+"/"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());
trace(date_str); // displays current date in United States date format

関連項目

getMonth (Date.getMonth メソッド), getFullYear (Date.getFullYear メソッド)


 

このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート

現在のページ: http://livedocs.adobe.com/flash/9.0_jp/main/00001582.html