setFullYear

メソッド Type method
Dateオブジェクト.setFullYear(年数,月,日) Format Date object. SetFullYear (year, month, day)
Commentary
西暦年数(4桁)を設定します。 Years AD (four 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.setFullYear(2007); dateObj.setFullYear (2007);
n = dateObj.getFullYear(); n = dateObj.getFullYear ();
outputs[0] = n; outputs [0] = n;