﻿
  var now = new Date();
  var year = now.getYear();
  var month = now.getMonth() + 1;
  var date = now.getDate();
  var riqi;
 if (now.getDay() == 5) riqi = "星期五";

if (now.getDay() == 6) riqi = "星期六";

if (now.getDay() == 0) riqi = "星期日";

if (now.getDay() == 1) riqi = "星期一";

if (now.getDay() == 2) riqi = "星期二";

if (now.getDay() == 3) riqi = "星期三";

if (now.getDay() == 4) riqi = "星期四"; 
  
  var timeValue = "";
  timeValue += year + "年";
  timeValue += ((month < 10) ? "0" : "") + month + "月";
  timeValue += ((date < 10) ? "0" : "") + date + "日  "+riqi;
  document.write(timeValue);