/** * Enhanced date handling for MCP tool inputs. * * Converts relative date expressions ("today", "last 7 days", etc.) * to ISO 8601 start/end pairs. Uses a strict regex allowlist — * anything not explicitly supported is rejected. * * All date math uses UTC to avoid timezone ambiguity. */ /** Error thrown when a date expression cannot be parsed */ export declare class InvalidDateExpression extends Error { readonly name = "InvalidDateExpression"; constructor(message: string); } /** Resolved date range from a date expression */ export interface DateRange { start: string; end: string; } /** Regex for ISO 8601 date or date-time strings */ export declare const ISO_8601_REGEX: RegExp; /** * Resolve a date expression to an ISO 8601 start/end range. * * Supported expressions (case-insensitive): * - ISO 8601 strings (pass-through) * - "today" * - "yesterday" * - "last N days" (1 ≤ N ≤ 365) * - "last N weeks" (1 ≤ N ≤ 52) * - "last N months" (1 ≤ N ≤ 12) * - "this week" (Monday to today) * - "last week" (previous Monday to Sunday) * - "this month" (1st to today) * - "last month" (full previous month) * - "this quarter" (quarter start to today) * - "last quarter" (full previous quarter) * - "last year" (full previous calendar year) * - "YYYY-MM" (full calendar month) * * @throws InvalidDateExpression for unrecognized or invalid expressions */ export declare function resolveDateExpression(expression: string, now?: Date): DateRange; /** * Validate that a resolved date range does not exceed maxDays. * * @param start - ISO 8601 start date * @param end - ISO 8601 end date * @param maxDays - Maximum allowed span in days (default: 365) * @throws InvalidDateExpression if end < start or range exceeds maxDays */ export declare function validateDateRange(start: string, end: string, maxDays?: number): void; //# sourceMappingURL=date-utils.d.ts.map