添加了解析时间的容错
This commit is contained in:
parent
5ff242d71b
commit
b5edb78131
@ -73,7 +73,12 @@ export function getweek(time: string, id: string,zhou?: number){
|
||||
dayjs.extend(timezone)
|
||||
const days: any = dayjs;
|
||||
console.log(id, 11111)
|
||||
let now = days((!time ? undefined : time)).tz(id)
|
||||
let now;
|
||||
try {
|
||||
now = days((!time ? undefined : time)).tz(id)
|
||||
} catch (error) {
|
||||
now = days(undefined).tz(id)
|
||||
}
|
||||
console.log(now, 11111)
|
||||
|
||||
if(zhou != undefined){
|
||||
|
Loading…
Reference in New Issue
Block a user