Date.prototype.getUTCDate()
getUTCDate()
メソッドは、協定世界時に基づき、指定された日時の月内の日 (1~31) を返します。
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.getUTCDate()
返値
協定世界時に基づき、与えられた日付の「日」を表す 1 から 31 までの整数値です。
例
getUTCDate() の使用
次の例は、現在日時の「日」の部分を変数 dayOfMonth
に代入します。
var today = new Date();
var dayOfMonth = today.getUTCDate();
仕様書
ブラウザーの互換性
BCD tables only load in the browser