メソッド Type method
Dateオブジェクト.setUTCFullYear(年数,月,日) Format Date object. SetUTCFullYear (year, month, day)
Commentary
協定世界時の西暦年数(4桁)を設定します。 AD Years of Coordinated Universal Time (4 digits). 省略すると現在の年数になります。 Current year and will be omitted. 月日とも省略することができます。 You can also omit月日. システムなどの時計には影響を与えません。 The clock does not affect systems.
サンプルコード Sample code
dateObj = new Date(); dateObj = new Date ();
dateObj.setUTCFullYear(2007); dateObj.setUTCFullYear (2007);
n = dateObj.getUTCFullYear(); n = dateObj.getUTCFullYear ();
outputs[0] = n; outputs [0] = n;