/** * Reading an instant in a named zone, and building an instant from one. * * **A zone is an area and location name and never a fixed offset**, which * `stdlib.md` section 12.1 requires and gives the reason for: an offset held * constant is silently wrong for half the year anywhere that observes a * seasonal clock change, and nothing about the wrong half looks wrong. * * **The zone table is the runtime's own and is not carried here.** A table * copied into this repository would be a second copy of a fact that changes * several times a year by government decision, and a stale copy is wrong in the * same invisible way a fixed offset is. The language's own standard date * facilities carry that table, so they are what is asked. Nothing below reads a * clock: the only instants that enter are the ones a script passed in, which is * what `compiled-program.md` section 8.4 requires of everything except * `chart.now()`. * * **Two engines agree only as far as their zone tables do**, and that is stated * rather than hidden. Two engines holding the same table compute the same * instants; two holding tables from different years can differ across a rule * change a government made between them. That is true of every zone-aware * calendar in existence, and the alternative, a table frozen in this package, * is worse: it would be wrong for everyone rather than only across a change. */ import type { Civil } from './civil.js'; /** Whether the runtime's zone table holds this name. */ export declare function isKnownZone(zone: string): boolean; /** The civil fields an instant has in a zone, or nothing for an unknown zone. */ export declare function fieldsIn(instant: number, zone: string): Civil | null; /** The instant a civil date and time names in UTC, with no zone applied. */ export declare function utcInstantOf(fields: Civil): number; /** How far ahead of UTC a zone was at an instant, in milliseconds. */ export declare function offsetAt(instant: number, zone: string): number | null; /** * The instant a wall clock reading names in a zone. * * A reading is not an instant until a zone is applied, and the offset to apply * is the offset at the answer rather than at the reading, so this works the * other way round: it takes the two offsets the zone had a day either side, * builds the instant each one implies, and keeps the ones that read back as the * reading it was given. * * Two readings have no single answer and both are settled here rather than left * to an engine. **A reading the clock repeated**, the hour an autumn change * gives back, has two instants that read back correctly, and the answer is the * earlier of them: that is when a session opening at that clock time opens. * **A reading the clock skipped**, the hour a spring change removes, has none, * and the answer is the reading moved forward by the size of the gap, which is * where that hour would have been; absence there would put a hole in a study * one morning a year. */ export declare function instantOf(fields: Civil, zone: string): number | null; //# sourceMappingURL=zone.d.ts.map