Interface MomentTimezone

interface MomentTimezone {
    dataVersion: string;
    add(packedZoneString): void;
    add(packedZoneString): void;
    countries(): string[];
    guess(ignoreCache?): string;
    link(packedLinkString): void;
    link(packedLinkString): void;
    load(data): void;
    names(): string[];
    setDefault(timezone?): Moment;
    zone(timezone): null | MomentZone;
    zonesForCountry<T>(country, with_offset): T extends true
        ? MomentZoneOffset[]
        : never;
    zonesForCountry<T>(country, with_offset?): T extends false
        ? string[]
        : never;
    zonesForCountry(country, with_offset?): string[] | MomentZoneOffset[];
    (): Moment;
    (timezone): Moment;
    (date, timezone): Moment;
    (date, timezone): Moment;
    (date, timezone): Moment;
    (date, format, timezone): Moment;
    (date, format, strict, timezone): Moment;
    (date, format, language, timezone): Moment;
    (date, format, language, strict, timezone): Moment;
    (date, timezone): Moment;
    (date, timezone): Moment;
    (date, timezone): Moment;
}
  • Returns Moment

  • Parameters

    • timezone: string

    Returns Moment

  • Parameters

    • date: number
    • timezone: string

    Returns Moment

  • Parameters

    • date: number[]
    • timezone: string

    Returns Moment

  • Parameters

    • date: string
    • timezone: string

    Returns Moment

  • Parameters

    Returns Moment

  • Parameters

    Returns Moment

  • Parameters

    Returns Moment

  • Parameters

    Returns Moment

  • Parameters

    • date: Date
    • timezone: string

    Returns Moment

  • Parameters

    Returns Moment

  • Parameters

    • date: any
    • timezone: string

    Returns Moment

Properties

dataVersion: string

Methods

  • Parameters

    • packedZoneString: string

    Returns void

  • Parameters

    • packedZoneString: string[]

    Returns void

  • Returns string[]

  • Parameters

    • Optional ignoreCache: boolean

    Returns string

  • Parameters

    • packedLinkString: string

    Returns void

  • Parameters

    • packedLinkString: string[]

    Returns void

  • Parameters

    • data: {
          links: string[];
          version: string;
          zones: string[];
      }
      • links: string[]
      • version: string
      • zones: string[]

    Returns void

  • Returns string[]

  • Parameters

    • Optional timezone: string

    Returns Moment

  • Type Parameters

    • T extends true

    Parameters

    • country: string
    • with_offset: T

    Returns T extends true
        ? MomentZoneOffset[]
        : never

  • Type Parameters

    • T extends false

    Parameters

    • country: string
    • Optional with_offset: T

    Returns T extends false
        ? string[]
        : never

  • Parameters

    • country: string
    • Optional with_offset: boolean

    Returns string[] | MomentZoneOffset[]