﻿/*
 *Get the date now
 *
 *@todo support several styles supplied to format output
 */
(function outputDate(){
    var now = new Date();
    var year = now.getFullYear();
    var month = now.getMonth() + 1;
    var date = now.getDate();
    var day = now.getDay();
    function getChineseDay(n){
	    var chineseDays = ['日', '一', '二', '三', '四', '五', '六'];
	    return chineseDays[n];
    }
    document.write(''+year + '年' + month + '月' + date + '日'+'&nbsp;星期'+getChineseDay(day));
})();

