dateObj.getUTCMonth()
dateObj:必選,Date 物件。取得本地時間月份請用 getMonth()。回傳值比慣用月份數字少 1,使用時需 +1 顯示。
function UTCDateDemo() {
var d = new Date();
var s = "今天 UTC 日期是: ";
s += (d.getUTCMonth() + 1) + "/";
s += d.getUTCDate() + "/";
s += d.getUTCFullYear();
return s;
}