var today=new Date(); var y=today.getFullYear(); document.write("今年は西暦",y,"年です。");