import { DateTime } from 'luxon'; import { TimeRange, TimeUnit } from '../core/types'; /** * Utility functions for time comparisons and range calculations */ export declare class TimeUtils { /** * Parse a time range specification * * Formats: * - -60:+60 → {before: -60, after: 60} (both past and future) * - +60 → {before: 0, after: 60} (only future) * - -60 → {before: -60, after: 0} (only past) */ static parseTimeRange(rangeSpec: string, unit: TimeUnit): TimeRange; /** * Check if a time is within a range of a base time */ static isTimeInRange(actualTime: DateTime, baseTime: DateTime, range: TimeRange): { inRange: boolean; difference: number; unit: string; }; /** * Parse a timestamp (string or number) to DateTime * * Supports: * - ISO strings: "2023-12-01T10:30:00Z" or "2023-12-01T10:30:00+01:00" * - Unix timestamps in seconds: 1234567890 * - Unix timestamps in milliseconds: 1234567890000 * * Note: Preserves timezone information from ISO strings and converts to UTC * for consistent comparisons. */ static parseTimestamp(value: string | number): DateTime; /** * Get base time from context * * Priority: startTimeTest > startTimeScript > current time */ static getBaseTime(context: Record): DateTime; /** * Calculate a time with offset */ static calculateTime(baseTime: DateTime, offset: number, unit: TimeUnit): DateTime; /** * Format a range for error messages */ static formatRange(range: TimeRange): string; } //# sourceMappingURL=TimeUtils.d.ts.map