Library API
    Preparing search index...

    Function getOffsets

    • Returns the January and July offsets (in nanoseconds) for a given timezone and year. Used for inferring daylight saving time and hemisphere characteristics.

      Parameters

      • timeZone: string

        The IANA timezone string

      • year: number = 2024

        The reference year to calculate offsets for (default: 2024 for stability)

      Returns { jan: number; jul: number }

      An object containing the jan and jul offsets