Date.getMonth - 月の値を得る
構文
dateObject.getMonth()
サポートブラウザ:
- 3+
- 1+
- 2+
「月の値を得る」サンプルコード
「Date.getMonthの動作デモ」
新しいウィンドウで実行 | スクリプトを編集&実行 - スクリプトをWEB上で編集&動作確認することが出来ます。
関連ページ
日の値を得る - Date.getDate
曜日の値を得る - Date.getDay
4桁の年数の値を得る - Date.getFullYear
時の値を得る - Date.getHours
ミリ秒の値を得る - Date.getMilliseconds
分の値を得る - Date.getMinutes
秒の値を得る - Date.getSeconds
1970/1/1からの秒数を得る - Date.getTime
標準時からの時差を得る - Date.getTimezoneOffset
年の値を得る - Date.getYear
1970/1/1からのミリ秒数を得る - Date.parse
日の値を設定 - Date.setDate
4桁の年数の値を設定 - Date.setFullYear
時の値を設定 - Date.setHours
ミリ秒の値を設定 - Date.setMilliseconds
分の値を設定 - Date.setMinutes
月の値を設定 - Date.setMonth
秒の値を設定 - Date.setSeconds
年の値を設定 - Date.setYear
[Fri Apr 1 2006]の形式で日付を得る - Date.toDateString
[2006年4月1日]の形式で日付を得る - Date.toLocaleDateString
[fri apr 1 00:00:00 utc+0900 2006]の形式で時刻を得る - Date.toLocaleLowerCase
[00:00:00]の形式で時刻を得る - Date.toLocaleTimeString
[FRI APR 1 00:00:00 UTC+0900 2006]の形式で時刻を得る - Date.toLocaleUpperCase
[00:00:00 UTF+0900]の形式で時刻を得る - Date.toTimeString