import { type FormatOptions } from './tokens.cjs'; export declare const WEEKDAY_NAMES: string[]; export declare const MONTH_NAMES: string[]; export declare const SPANISH_MONTH_NAMES: string[]; export declare const FRENCH_MONTH_NAMES: string[]; export declare const GERMAN_MONTH_NAMES: string[]; export declare const SPANISH_WEEKDAY_NAMES: string[]; export declare const FRENCH_WEEKDAY_NAMES: string[]; export declare const GERMAN_WEEKDAY_NAMES: string[]; export interface ParseRelativeOptions extends FormatOptions { /** * Opt-in typo tolerance. When the input doesn't match any phrase * exactly, retry after correcting individual words (weekday names, * month names, and marker words like "next"/"ago"/"tomorrow") that * are within a small edit distance of a known word — e.g. * "tommorow" → "tomorrow", "next tuesady" → "next tuesday". Numbers * are never touched. * * Off by default, matching this library's throw-rather-than-guess * philosophy elsewhere (parse()'s `lenient` option is the same shape * of opt-in). English only for this option currently — combining * `fuzzy: true` with a non-English `locale` throws rather than * silently skipping the fuzzy pass. * * If no correction produces a recognized phrase, throws the same * "doesn't recognize" error the exact pass would have thrown. */ fuzzy?: boolean; } /** * Resolve common relative-date phrases against a reference date, * returning a Temporal.PlainDate. Supports English by default, plus * Spanish (es), French (fr), and German (de) via the `locale` option. * * Supported phrase classes (with examples per language): * * - weekday refs: "next Tuesday" / "el próximo martes" / "mardi prochain" / "nächsten Dienstag" * - day offsets: "today" / "hoy" / "aujourd'hui" / "heute" (and tomorrow/yesterday equivalents) * - unit offsets: "in 3 days" / "en 3 días" / "dans 3 jours" / "in 3 Tagen" * - month-day without year: "March 5th" / "5 de marzo" / "5 mars" / "5. März" * * Ambiguous-case handling is consistent across all four languages: * "next X" said on X (today is the named weekday) means 7 days from * now, not today. "last X" said on X means 7 days ago. See README * "parseRelative" for the documented behavior of each ambiguous case. * * Throws a descriptive error for any phrase it doesn't recognize in * the target language, rather than guessing. A bare "5 days" without * "in" or "ago" (or the per-language equivalent) throws with a message * pointing at the disambiguation options. * * Returns a Temporal.PlainDate for every supported phrase. Time-of-day * extensions like "next Tuesday at 3pm" aren't supported in this pass. */ export declare function parseRelative(input: string, referenceDate: unknown, options?: ParseRelativeOptions): unknown;