v2.0.11-20230414

This commit is contained in:
MI15\Win
2023-04-14 16:10:51 +08:00
parent d1f4530ded
commit 0ef96aba23
7 changed files with 471 additions and 38 deletions

View File

@@ -35,13 +35,16 @@ function _GET(letiable,top = false){
return false;
}
//时间戳格式化
function timestampToTime(timestamp) {
function timestampToTime(timestamp,ymd = false) {
let date = new Date(timestamp * 1000);
let y = date.getFullYear();
let m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
if(ymd){
return y + '-' + m + '-' + d;
}
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let minute = date.getMinutes();