import type { OffsetAst } from './parser-types.js'; /** * Parse a timezone offset string into structured components. * * Supports three formats: * - Standard: +08:00, -05:30 * - Compact: +0530, -0800 * - Short: +09, -05 * * Valid timezone offset ranges (per ISO 8601): * - Hours: 0-14 (UTC-12:00 to UTC+14:00) * - Minutes: 0-59 * * Note: This function only parses numeric offsets (e.g., +08:00). * For UTC, use 'Z' (UtcOffset kind) which is semantically different from +00:00. * Per RFC 3339 section 4.3, -00:00 indicates "local time with unknown offset". * * @param offsetString - The offset string to parse (e.g., '+08:00', '-0530', '+09') * @param position - Position in token stream for error reporting (optional) * @returns Parsed offset with sign, hours, and minutes * @throws {ParseError} If the offset format is invalid or out of range * * @example * ```typescript * parseOffset('+08:00') // { kind: 'NumericOffset', sign: '+', hours: 8, minutes: 0, raw: '+08:00' } * parseOffset('-05:30') // { kind: 'NumericOffset', sign: '-', hours: 5, minutes: 30, raw: '-05:30' } * parseOffset('+0530') // { kind: 'NumericOffset', sign: '+', hours: 5, minutes: 30, raw: '+0530' } * parseOffset('+09') // { kind: 'NumericOffset', sign: '+', hours: 9, minutes: 0, raw: '+09' } * parseOffset('+14:00') // { kind: 'NumericOffset', sign: '+', hours: 14, minutes: 0, raw: '+14:00' } * ``` */ export declare function parseOffset(offsetString: string, position?: number): OffsetAst; //# sourceMappingURL=parseOffset.d.ts.map