/** * The calendar reads of `stdlib.md` section 12.2, each one an instant and a * zone in and a number out. * * Every one of them is absent rather than a guess when the zone is not one the * runtime holds or the instant is not a number. An unknown zone is OS6005, and * raising it is the engine's to do at the call site, where there is a span to * point at; this tier raises nothing, for the reason the library's own index * gives. */ import type { Value } from '../values/index.js'; import type { Civil } from './civil.js'; /** Which field of a civil date a read wants. */ export type DateField = 'year' | 'month' | 'day' | 'dayOfWeek' | 'dayOfYear' | 'hour' | 'minute' | 'second' | 'weekOfYear'; /** One calendar field of an instant, read in a zone. */ export declare function dateField(instant: Value, zone: string | null, field: DateField): Value; /** Which boundary `startOfDay`, `startOfWeek` and `startOfMonth` round back to. */ export type Boundary = 'day' | 'week' | 'month'; /** * Midnight at the start of the day, the Monday or the first of the month that * holds an instant, in a zone. * * The answer is built as a wall clock reading and then turned back into an * instant, rather than by subtracting a count of milliseconds. Subtracting is * wrong across a clock change, where a local day is twenty three or twenty five * hours long, and it is wrong in a way that shows up twice a year on one chart * and never on another. */ export declare function startOf(instant: Value, zone: string | null, boundary: Boundary): Value; /** Whether two instants fall on one calendar day in a zone. */ export declare function sameDay(a: Value, b: Value, zone: string | null): boolean | null; /** An instant built from calendar fields in a zone, `date.from`. */ export declare function instantFrom(year: Value, month: Value, day: Value, hour: Value, minute: Value, second: Value, zone: string | null): Value; /** The civil fields of an instant, or nothing when either side is unusable. */ export declare function civilAt(instant: Value, zone: string | null): Civil | null; //# sourceMappingURL=fields.d.ts.map