JavaScript 日付
16個の関数
new Datenew Date()現在の日付と時刻の Date オブジェクトを生成します。
Date.nowDate.now()現在時刻のタイムスタンプ(ミリ秒)を返します。
getFullYeardate.getFullYear()年(4 桁)を返します。
getMonthdate.getMonth()月を返します(0〜11、0 が 1 月)。
getDatedate.getDate()日(1〜31)を返します。
getDaydate.getDay()曜日を返します(0=日曜〜6=土曜)。
getHoursdate.getHours()時(0〜23)を返します。
getMinutesdate.getMinutes()分(0〜59)を返します。
getSecondsdate.getSeconds()秒(0〜59)を返します。
getTimedate.getTime()Unix エポックからのミリ秒数を返します。
setFullYeardate.setFullYear(year)年を設定します。
setMonthdate.setMonth(month)月を設定します(0〜11)。
setDatedate.setDate(day)日を設定します。
toLocaleDateStringdate.toLocaleDateString(locale, options?)ロケールに基づいた日付文字列を返します。
toLocaleTimeStringdate.toLocaleTimeString(locale, options?)ロケールに基づいた時刻文字列を返します。
toISOStringdate.toISOString()ISO 8601 形式の文字列を返します。
