Class IANAZone

A zone identified by an IANA identifier, like America/New_York

Implements

Hierarchy

Accessors

  • get ianaName(): string
  • Returns string

Methods

  • Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.

    Example

    IANAZone.isValidSpecifier("America/New_York") //=> true
    

    Example

    IANAZone.isValidSpecifier("Sport~~blorp") //=> false
    

    Deprecated

    This method returns false for some valid IANA names. Use isValidZone instead.

    Returns

    Parameters

    • s: string

      The string to check validity on

    Returns boolean

  • Returns whether the provided string identifies a real zone

    Example

    IANAZone.isValidZone("America/New_York") //=> true
    

    Example

    IANAZone.isValidZone("Fantasia/Castle") //=> false
    

    Example

    IANAZone.isValidZone("Sport~~blorp") //=> false
    

    Returns

    Parameters

    • zone: string

      The string to check

    Returns boolean

  • Reset local caches. Should only be necessary in testing scenarios.

    Returns

    Returns void

Generated using TypeDoc