diff options
Diffstat (limited to 'src/modules/dayjs/plugin/timezone/index.d.ts')
-rw-r--r-- | src/modules/dayjs/plugin/timezone/index.d.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/modules/dayjs/plugin/timezone/index.d.ts b/src/modules/dayjs/plugin/timezone/index.d.ts new file mode 100644 index 0000000..8d90359 --- /dev/null +++ b/src/modules/dayjs/plugin/timezone/index.d.ts @@ -0,0 +1,20 @@ +import { PluginFunc, ConfigType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + tz(timezone?: string, keepLocalTime?: boolean): Dayjs + offsetName(type?: 'short' | 'long'): string | undefined + } + + interface DayjsTimezone { + (date: ConfigType, timezone?: string): Dayjs + (date: ConfigType, format: string, timezone?: string): Dayjs + guess(): string + setDefault(timezone?: string): void + } + + const tz: DayjsTimezone +} |