• Parameters

    • offset: number

      offset w.r.t. UTC in minutes, e.g. 90 for +01:30. Note that time zones are cached so you don't necessarily get a new object each time.

    Returns TimeZone

    a time zone with the given fixed offset

    Throws

    timezonecomplete.Argument.Offset if the given offset is not within -24h...+24h (in minutes)

  • Time zone for an offset string or an IANA time zone string. Note that time zones are cached so you don't necessarily get a new object each time.

    Parameters

    • name: string
    • Optional dst: boolean

      Optional, default true: adhere to Daylight Saving Time if applicable. Note for "localtime", timezonecomplete will adhere to the computer settings, the DST flag does not have any effect.

    Returns TimeZone

    Throws

    timezonecomplete.Argument.S if s cannot be parsed

    Throws

    timezonecomplete.NotFound.Zone if the zone name doesn't exist in the time zone database

Generated using TypeDoc