UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

15 lines • 911 B
import { Temporal } from "./temporal.js"; /** * Count the distinct local (ISO) dates of the instants in the closed span `[start, end]`, in * `start`'s time zone. `end` must already be expressed in that zone and not precede `start`. * * Between two zone transitions the wall clock runs continuously, so every date from a run's * first to its last instant is touched. A transition can jump the clock past a whole date * (`Pacific/Apia` deleted 2011-12-30), which no instant then has, or back into the previous * date (`America/Goose_Bay` at 00:01 on 2010-11-07), which is touched again but counted once. * * @param start the span start * @param end the span end, in `start`'s zone * @returns the number of distinct local dates, or null past `MAX_WALKED_TRANSITIONS` transitions */ export declare function countZonedLocalDates(start: Temporal.ZonedDateTime, end: Temporal.ZonedDateTime): number | null;