|
@@ -817,9 +817,9 @@ function getCurrentDate(flg,con){
|
|
|
var h = myDate.getHours();
|
|
|
var m = myDate.getMinutes();
|
|
|
var s = myDate.getSeconds();
|
|
|
- date = year+link+mon.toString().padStart(2,'0')+link+day.toString().padStart(2,'0')+' '+h.toString().padStart(2,'0')+':'+m.toString().padStart(2,'0')+':'+s.toString().padStart(2,'0');
|
|
|
+ date = year+link+(mon<10?"0"+mon:mon)+link+(day<10?"0"+day:day)+' '+(h<10?"0"+h:h)+':'+(m<10?"0"+m:m)+':'+(s<10?"0"+s:s);
|
|
|
}else{
|
|
|
- date = year+link+mon.toString().padStart(2,'0')+link+day.toString().padStart(2,'0');
|
|
|
+ date = year+link+(mon<10?"0"+mon:mon)+link+(day<10?"0"+day:day);
|
|
|
}
|
|
|
return date;
|
|
|
}
|
|
@@ -925,11 +925,11 @@ function dateParser(timestamp,link = '-'){
|
|
|
let year = time.getFullYear();
|
|
|
let month = time.getMonth()+1;
|
|
|
let date = time.getDate();
|
|
|
- let hour = time.getHours().toString().padStart(2,'0');
|
|
|
- let minute = time.getMinutes().toString().padStart(2,'0');
|
|
|
- let second = time.getSeconds().toString().padStart(2,'0');
|
|
|
+ let hour = time.getHours();
|
|
|
+ let minute = time.getMinutes();
|
|
|
+ let second = time.getSeconds();
|
|
|
// let result = year+link+month+link+date;
|
|
|
- let result = year+link+(month<10?"0"+month:month)+link+(date<10?"0"+date:date)+' '+hour+':'+minute+':'+second;
|
|
|
+ let result = year+link+(month<10?"0"+month:month)+link+(date<10?"0"+date:date)+' '+(hour<10?"0"+hour:hour)+':'+(minute<10?"0"+minute:minute)+':'+(second<10?"0"+second:second);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -1175,15 +1175,9 @@ function getIds(data){
|
|
|
* @param {时间是否包含时分秒} flg
|
|
|
* @param {连接符} con
|
|
|
*/
|
|
|
-function getCalendarDate(info,flg,con) {
|
|
|
- let date = '';
|
|
|
- let time = flg?flg:false;
|
|
|
- let conect = con?con:'-';
|
|
|
- if(time){
|
|
|
- date = info.year + conect + (info.month).toString().padStart(2,'0') + conect + (info.day).toString().padStart(2,'0') + ' '+(info.hour).toString().padStart(2,'0')+':'+(info.minute).toString().padStart(2,'0')+':'+(info.second).toString().padStart(2,'0');
|
|
|
- }else{
|
|
|
- date = info.year + conect + (info.month < 10 ? '0' + info.month : info.month) + conect + (info.day < 10 ? '0' + info.day : info.day);
|
|
|
- }
|
|
|
+function getCalendarDate(info) {
|
|
|
+ let conect = '-';
|
|
|
+ let date = info.year + conect + (info.month < 10 ? '0' + info.month : info.month) + conect + (info.day < 10 ? '0' + info.day : info.day) + ' '+ (info.hour < 10 ? '0' + info.hour : info.hour)+':'+ (info.minute < 10 ? '0' + info.minute : info.minute)+':'+ (info.second < 10 ? '0' + info.second : info.second);
|
|
|
return date;
|
|
|
}
|
|
|
|