var now = new Date(); //変数でDateオブジェクトを作成
var year = now.getYear();
var month = now.getMonth() + 1;
var today = now.getDate();
var myDay = now.getDay();
var day = new Array("日","月","火","水","木","金","土");
var weeks = day[myDay];
document.write("今日は" + year + "年" + month + "月" + today + "日で、" + weeks + "曜日です。");
