getFullYear

種類メソッド
書式 Dateオブジェクト.getFullYear()
解説
年数(西暦4桁)を返します。
サンプルコード
dObj = new Date();
alert("今年は"+dObj.getFullYear()+"年です。");
実際のスクリプトをダウンロード