|
@@ -16,15 +16,16 @@ export function numberB0(n) {
|
|
|
export function getBzDate(time, tag, type = "date") {
|
|
|
let dateTime = new Date(time).getTime() + 3600*1000*24*tag;
|
|
|
let newDate = new Date(dateTime);
|
|
|
+ let result = newDate.getFullYear() + "-" + numberB0((newDate.getMonth() + 1)) + "-" + numberB0(newDate.getDate());
|
|
|
switch(type){
|
|
|
case "date":
|
|
|
- return newDate.getFullYear() + "-" + numberB0((newDate.getMonth() + 1)) + "-" + numberB0(newDate.getDate());
|
|
|
+ return result;
|
|
|
break;
|
|
|
case "datetime":
|
|
|
- return newDate.getFullYear() + "-" + numberB0((newDate.getMonth() + 1)) + "-" + numberB0(newDate.getDate()) + " " + numberB0(newDate.getHours()) + ":" + numberB0(newDate.getMinutes()) + ":" + numberB0(newDate.getSeconds());
|
|
|
+ return neresult + " " + numberB0(newDate.getHours()) + ":" + numberB0(newDate.getMinutes()) + ":" + numberB0(newDate.getSeconds());
|
|
|
break;
|
|
|
default:
|
|
|
- return newDate.getFullYear() + "-" + numberB0((newDate.getMonth() + 1)) + "-" + numberB0(newDate.getDate());
|
|
|
+ return result;
|
|
|
}
|
|
|
}
|
|
|
|