Library API
    Preparing search index...

    Function compareByUnit

    • Compares two Temporal.ZonedDateTime instants at the specified calendar or time unit granularity. The second value is projected into the first value's time zone and calendar before comparison.

      Parameters

      • first: ZonedDateTime

        Reference zoned date-time (its time zone and calendar govern unit boundaries)

      • second: ZonedDateTime

        Target zoned date-time to compare against first

      • unit: TemporalCompareUnit

        Calendar/time unit or 'time'

      Returns -1 | 0 | 1

      -1 if first < second, 0 if equal at that unit, or 1 if first > second