/** * Format bigint TIME microseconds as HH:MM:SS.mmm, adding the microsecond * digits only when the value has sub-millisecond precision. */ export declare function timeFromMicros(value: bigint): string; export interface TimestampStringParts { date: string; time?: string; fraction?: string; /** `Z` or a `+HH:MM` / `-HH:MM` offset. */ offset?: string; } /** * Split an ISO-like timestamp string (`YYYY-MM-DD[( |T)HH:MM[:SS[.f]]][offset]`) * into its parts. Offsets may be `Z`, `+HH`, `+HHMM` or `+HH:MM`. */ export declare function parseTimestampString(value: string): TimestampStringParts | undefined; /** * Build a string that `new Date()` parses, treating a missing offset as UTC. * Strings outside the ISO-like shape keep the older best effort handling. */ export declare function timestampStringToDateInput(value: string, parts?: TimestampStringParts | undefined): string; /** * Rewrite parsed timestamp parts as a UTC wall time (`YYYY-MM-DD HH:MM:SS` * plus the original fractional digits, without an offset). A missing offset * is read as UTC. Offsets are whole minutes, so the fraction is unchanged. */ export declare function utcTimestampString(parts: TimestampStringParts): string | undefined; /** * Format microseconds since the Unix epoch the way DuckDB prints a * TIMESTAMP: trailing fractional zeros are trimmed. `withTimezone` appends * `+00` because the value is rendered in UTC. */ export declare function timestampStringFromMicros(micros: bigint, withTimezone: boolean): string; /** * Format INTERVAL parts the way DuckDB casts an INTERVAL to VARCHAR, for * example `1 year 2 months 3 days 04:05:06.5`. DuckDB parses this text back. */ export declare function intervalToString(months: number, days: number, micros: bigint): string; /** Sub-millisecond microseconds carried by a fractional seconds string. */ export declare function subMillisecondMicros(fraction: string | undefined): bigint;