/**
 * @file plainDate.ts
 * @input ISO date strings, year/month/day numbers
 * @output Immutable PlainDate records and pure date arithmetic
 * @position Shared utility; replaces scattered Date usage across Calendar hooks
 */
import type { ISODateString, PlainDate } from './dateTypes';
import type { Locale } from '../i18n/types';
export type { PlainDate } from './dateTypes';
export declare function plainDateCreate(year: number, month: number, day: number): PlainDate;
export declare function plainDateFromISO(str: ISODateString): PlainDate;
export declare function plainDateToISO(pd: PlainDate): ISODateString;
export declare function plainDateToDate(pd: PlainDate): Date;
export declare function plainDateFromDate(d: Date): PlainDate;
export declare function plainDateToday(): PlainDate;
export declare function getDaysInMonth(year: number, month: number): number;
export declare function plainDateDayOfWeek(pd: PlainDate): number;
export declare function plainDateAddMonths(pd: PlainDate, n: number): PlainDate;
export declare function plainDateAddDays(pd: PlainDate, n: number): PlainDate;
/**
 * Whole calendar days from `a` to `b`, ignoring time of day. Positive when
 * `b` is after `a`, negative when before. Uses UTC midnight so DST shifts
 * never add or drop a day.
 */
export declare function plainDateDiffDays(a: PlainDate, b: PlainDate): number;
/**
 * The wall-clock fields an instant reads as in a given zone.
 *
 * A fixed `'en-US'` locale with `hourCycle: 'h23'` keeps the parts numeric and
 * stable whatever locale the viewer has, so callers can assemble machine
 * shapes (`YYYY-MM-DD`, `HH:mm:ss`) from them. Exported for Timestamp, whose
 * `system_*` formats are built from these fields rather than through `Intl`
 * formatting.
 */
export declare function getTimeZoneParts(instant: number, timezoneID: string): {
    year: number;
    month: number;
    day: number;
    hour: number;
    minute: number;
    second: number;
};
export declare function plainDateToInstant(date: PlainDate, timezoneID: string, hour?: number, minute?: number): number;
export declare function plainDateFromInstant(instant: number, timezoneID: string): PlainDate;
export declare function plainDateIsBefore(a: PlainDate, b: PlainDate): boolean;
export declare function plainDateIsAfter(a: PlainDate, b: PlainDate): boolean;
export declare function plainDateIsEqual(a: PlainDate, b: PlainDate): boolean;
export declare function plainDateMax(a: PlainDate, b: PlainDate): PlainDate;
export declare function plainDateMin(a: PlainDate, b: PlainDate): PlainDate;
export declare function plainDateIsInRange(pd: PlainDate, range: [PlainDate, PlainDate]): boolean;
export declare function plainDateSetFirstOfMonth(pd: PlainDate): PlainDate;
export declare function plainDateSetStartOfWeek(pd: PlainDate, weekStartsOn: number): PlainDate;
export declare function plainDateSetEndOfWeekExclusive(pd: PlainDate, weekStartsOn: number): PlainDate;
export declare function plainDateGetWeekNumber(pd: PlainDate): number;
export declare const DATE_FORMAT_WITH_WEEKDAY: Intl.DateTimeFormatOptions;
export declare const DATE_FORMAT_SHORT_WITH_WEEKDAY: Intl.DateTimeFormatOptions;
export declare const DATE_FORMAT_LONG: Intl.DateTimeFormatOptions;
export declare const DATE_FORMAT_MONTH_YEAR: Intl.DateTimeFormatOptions;
export declare const DATE_FORMAT_WEEKDAY_ONLY: Intl.DateTimeFormatOptions;
export declare const DATE_FORMAT_MONTH_ONLY: Intl.DateTimeFormatOptions;
export declare const DATE_FORMAT_SHORT: Intl.DateTimeFormatOptions;
export declare const DATE_FORMAT_SHORT_WITH_YEAR: Intl.DateTimeFormatOptions;
export declare function plainDateFormat(pd: PlainDate, options: Intl.DateTimeFormatOptions, locale?: Locale): string;
/**
 * The date-only members of Timestamp's `format` vocabulary that a
 * calendar-date field (no time-of-day) can render. Both Timestamp and
 * DateInput share these string literals and the mapping below so that the same
 * literal renders the same date shape in either component.
 *
 * - `date`: locale short-month date, e.g. "Mar 21, 2026"
 * - `date_long`: locale long-month date, e.g. "March 21, 2026"
 * - `date_weekday`: short weekday + short-month date, e.g. "Wed, Mar 21, 2026"
 * - `system_date`: ISO 8601 calendar date, e.g. "2026-03-21"
 */
export type SharedDateFormat = 'date' | 'date_long' | 'date_weekday' | 'system_date';
/**
 * Intl option bags for the locale-aware shared date members. `system_date` is
 * intentionally absent — it is emitted as a fixed ISO `YYYY-MM-DD` string, not
 * via `Intl` — and is handled directly by {@link formatSharedDate}.
 *
 * This is the single source of truth consumed by both Timestamp's
 * `formatTimestamp` switch and DateInput's display path, so the two never
 * drift for the members they share.
 */
export declare const SHARED_DATE_FORMAT_OPTIONS: Record<Exclude<SharedDateFormat, 'system_date'>, Intl.DateTimeFormatOptions>;
/**
 * Renders a {@link PlainDate} using one of the {@link SharedDateFormat}
 * members. The shared entry point DateInput uses for the named-format path;
 * Timestamp maps the same members onto {@link SHARED_DATE_FORMAT_OPTIONS} in
 * its own `formatTimestamp` switch (its input is a `Date`, not a `PlainDate`).
 */
export declare function formatSharedDate(pd: PlainDate, format: SharedDateFormat, locale?: Locale): string;
//# sourceMappingURL=plainDate.d.ts.map