Recently made a JavaScript to display the next day's date case now the function code is published
Date.prototype.pattern=function (FMT) {var o = {"m+": This.getmonth () +1,//month "d+": th Is.getdate (),//day "h+": this.gethours ()%12 = = 0?
12:this.gethours ()%12,//hr "h+": this.gethours (),//Hour "m+": this.getminutes (),//min "S+": This.getseconds (),//sec "q+": Math.floor ((This.getmonth () +3)/3),//quarter "s": This.getmilliseco
NDS ()//millisecond};
var week = {"0": "\u65e5", "1": "\u4e00", "2": "\u4e8c", "3": "\u4e09",
"4": "\u56db", "5": "\u4e94", "6": "\U516D"};
if (/(y+)/.test (FMT)) {Fmt=fmt.replace regexp.$1 (this.getfullyear () + ""). substr (4-regexp.$1.length)); } if (/(e+)/.test (FMT)) {fmt=fmt.replace (regexp.$1)? (regexp.$1.length>2?) "\u661f\u671f": "\u5468"): "") +week[this.getday () +""]); For (var k in O) {if (New RegExp ("+ K +")). Test (FMT)) {FMT = Fmt.replace (R Egexp.$1, (regexp.$1.length==1)?
(O[k]): (("+ o[k]"). substr (("" + o[k). length));
} return FMT;
}
Call method:
var curstr = Tommorrow.pattern ("Yyyy-mm-dd hh:mm:ss");