时区渲染

This commit is contained in:
2020-11-18 10:51:03 +08:00
parent 849b04a1ee
commit da8c001b44
3 changed files with 24 additions and 6 deletions

View File

@@ -64,8 +64,18 @@ export function getdate(yue?: number): GetDate{
}
export function getweek(time: string,zhou?: number){
let now = dayjs((!time ? undefined : time))
export function getweek(time: string, id: string,zhou?: number){
/* eslint-disable */
const utc = require('dayjs/plugin/utc') // dependent on utc plugin
/* eslint-disable */
const timezone = require('dayjs/plugin/timezone')
dayjs.extend(utc)
dayjs.extend(timezone)
const days: any = dayjs;
console.log(id, 11111)
let now = days((!time ? undefined : time)).tz(id)
console.log(now, 11111)
if(zhou != undefined){
now = now.day(now.day() + (zhou * 6));
}