Date.prototype.getUTCDate()
getUTCDay()
メソッドは、協定世界時に基づき、指定された日時の「曜日」を返します。0 は日曜日を表します。
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
構文
dateObj.getUTCDay()
返値
協定世界時に基づき、与えられた日付の「曜日」に相当する整数値。0 は日曜日、1 は月曜日、2 は火曜日を表します。
例
getUTCDay() の使用
次の例は、現在日時の「曜日」部を変数 weekday
に代入します。
var today = new Date();
var weekday = today.getUTCDay();
仕様書
ブラウザーの互換性
BCD tables only load in the browser