timezone.d.ts 502 B

1234567891011121314151617181920
  1. import { PluginFunc, ConfigType } from 'dayjs'
  2. declare const plugin: PluginFunc
  3. export = plugin
  4. declare module 'dayjs' {
  5. interface Dayjs {
  6. tz(timezone?: string, keepLocalTime?: boolean): Dayjs
  7. offsetName(type?: 'short' | 'long'): string | undefined
  8. }
  9. interface DayjsTimezone {
  10. (date?: ConfigType, timezone?: string): Dayjs
  11. (date: ConfigType, format: string, timezone?: string): Dayjs
  12. guess(): string
  13. setDefault(timezone?: string): void
  14. }
  15. const tz: DayjsTimezone
  16. }