获取当前的hxdnht
//是否要获取当前hxdnhtletdate=new date (lety=date.getfullyear ) (let M=date.getMonth ) (1) 10? '0'(date.getmonth(1) : ) date.getmonth) let D=date.getDate ) ) 10? (0)0' date.getDate () : date.getDate ) ) let hours=date.getHours ) ) let minutes=date.getMinutes ) ) 10? (0)0' date.getMinutes () : date.getMinutes ) ) let seconds=date.getSeconds ) ) 10? (0)0' date.getSeconds () : date.getSeconds ) ) date=y '-' m '-' d ' hours ' : ' minutes ' 3360 '
let my date=new date (const lw=new date ) mydate-1000*60*60*24*90 ) /最后数字90可以更改。 90天的含义const YY=lw.getfullyear (const mm=lw.getmonth ) )1const DD=lw.getdate (const hh=new date ).getHours )。 '0'newdate(.getMinutes ) ) : new date (.get minutes ) ) const ss=new date (.get seconds ) ) 10? '0'newdate(.getSeconds ) ) : new date (.get seconds ) ) conststartdate=YY'-' ) M10? '0'mm:mm(-) ) DD10? '0' dd : dd ),' hh ':' mf ':' ss//上一个日期