Date.prototype.pattern=function(fmt) {
var o = {
"M+" : this.getMonth()+1, //月份
"d+" : this.getDate(), //日
//"h+" : this.getHours()%12 == 0 ? 12 : this.getHours()%12, //12小时制
"h+" : this.getHours(), //24小时制
"H+" : this.getHours(), //小时
"m+" : this.getMinutes(), //分
"s+" : this.getSeconds(), //秒
"S" : this.getMilliseconds() //毫秒
};
var date =new Date().pattern("发布于yyyy年MM月dd日 EEE hh时mm分ss秒S毫秒");
var o = {
"M+" : this.getMonth()+1, //月份
"d+" : this.getDate(), //日
//"h+" : this.getHours()%12 == 0 ? 12 : this.getHours()%12, //12小时制
"h+" : this.getHours(), //24小时制
"H+" : this.getHours(), //小时
"m+" : this.getMinutes(), //分
"s+" : this.getSeconds(), //秒
"S" : this.getMilliseconds() //毫秒
};
var date =new Date().pattern("发布于yyyy年MM月dd日 EEE hh时mm分ss秒S毫秒");