export type DateInput = Date | number | string; declare function _parseUTC(input: DateInput): Date; export declare const utc: typeof _parseUTC & { /** Parse and return normalized ISO string with Z */ iso(input: DateInput): string; /** Parse and return UTC date-only string "YYYY-MM-DD" */ date(input: DateInput): string; /** Parse and return epoch ms */ ms(input: DateInput): number; }; export declare const local: { /** Format a Date as ISO string with local TZ offset, e.g. "2026-05-05T11:00:00.000+03:00" */ iso(date?: Date): string; /** Current device TZ offset string, e.g. "+03:00" or "-05:00" */ offset(date?: Date): string; }; export type TimeDeltaUnit = 'days' | 'hours' | 'minutes' | 'seconds' | 'weeks' | 'months' | 'years'; export interface TimeDeltaOptions { days?: number; hours?: number; minutes?: number; seconds?: number; weeks?: number; months?: number; years?: number; } export type DateDiffUnit = 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months'; export type DayFormatTypes = 'DD' | 'DDD' | 'DDDD'; export type MonthFormatTypes = 'MM' | 'MMM' | 'MMMM'; export type YearFormatTypes = 'YY' | 'YYYY'; export type HourFormatTypes = 'HH'; export type MinuteFormatTypes = 'mm'; export type SecondFormatTypes = 'ss'; export type MillisecondFormatTypes = 'sss'; export type AmPmFormatTypes = 'AmPm'; export type DateFormatSeparatorTypes = '/' | '-' | ' ' | ':' | '.'; export type CommonDateFormats = `${DayFormatTypes}${DateFormatSeparatorTypes}${MonthFormatTypes}${DateFormatSeparatorTypes}${YearFormatTypes}` | `${MonthFormatTypes}${DateFormatSeparatorTypes}${YearFormatTypes}` | 'DD.MM.YY' | 'DD.MM.YYYY' | 'DD/MM/YY' | 'DD/MM/YYYY' | 'MM.DD.YY' | 'MM.DD.YYYY' | 'MM/DD/YY' | 'MM/DD/YYYY' | 'YYYY-MM-DD' | 'YY-MM-DD' | 'DD MMM YYYY' | 'DD MMMM YYYY' | 'DDD, DD MMM' | 'DDDD, DD MMMM' | 'MMM DD' | 'MMMM DD'; export type CommonTimeFormats = 'HH:mm' | 'HH:mm:ss' | 'HH:mm:ss:sss' | 'HH:mm AmPm'; export type CommonDateTimeFormats = `${CommonDateFormats} ${CommonTimeFormats}` | `${CommonTimeFormats}, ${CommonDateFormats}` | 'YYYY-MM-DD HH:MM'; export type NamedFormats = 'ISO' | 'ISO8601' | 'UTC' | 'RFC2822' | 'RFC3339' | 'UNIX' | 'TIMESTAMP'; export type DateTimeAcceptedFormats = CommonDateFormats | CommonTimeFormats | CommonDateTimeFormats | DayFormatTypes | MonthFormatTypes | YearFormatTypes | HourFormatTypes | MinuteFormatTypes | SecondFormatTypes | MillisecondFormatTypes | NamedFormats; export interface FormatDateOptions extends Partial> { format?: DateTimeAcceptedFormats; locale?: Intl.LocalesArgument; tz?: string; } export declare const MS: { readonly SECOND: 1000; readonly MINUTE: 60000; readonly HOUR: 3600000; readonly DAY: 86400000; readonly WEEK: 604800000; }; export declare const SECOND: 1000; export declare const MINUTE: 60000; export declare const HOUR: 3600000; export declare const DAY: 86400000; export declare const WEEK: 604800000; export declare function timeDelta(date: DateInput, options: TimeDeltaOptions): Date; export declare function dateDiff(a: DateInput, b: DateInput, unit?: DateDiffUnit): number; export declare class DateChain { private _date; constructor(date: DateInput); add(n: number, unit?: TimeDeltaUnit): DateChain; subtract(n: number, unit?: TimeDeltaUnit): DateChain; diff(other: DateInput, unit?: DateDiffUnit): number; isBefore(other: DateInput): boolean; isAfter(other: DateInput): boolean; isSameDay(other: DateInput): boolean; toDate(): Date; valueOf(): number; toString(): string; } declare function _d(date?: DateInput): DateChain; export declare const d: typeof _d & { readonly now: DateChain; readonly today: DateChain; readonly tomorrow: DateChain; readonly yesterday: DateChain; readonly nextWeek: DateChain; readonly lastWeek: DateChain; readonly firstOfMonth: DateChain; readonly lastOfMonth: DateChain; readonly firstOfWeek: DateChain; readonly lastOfWeek: DateChain; readonly firstOfNextMonth: DateChain; readonly lastOfNextMonth: DateChain; readonly firstOfNextYear: DateChain; in: (n: number, unit?: TimeDeltaUnit) => DateChain; ago: (n: number, unit?: TimeDeltaUnit) => DateChain; diff: (a: DateInput, b: DateInput, unit?: DateDiffUnit) => number; isBefore: (a: DateInput, b: DateInput) => boolean; isAfter: (a: DateInput, b: DateInput) => boolean; isSameDay: (a: DateInput, b: DateInput) => boolean; }; export declare function handleTimezone(date: Date, intFmtOpt: Intl.DateTimeFormatOptions): Date; export declare function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, intFmtOpt?: Intl.DateTimeFormatOptions): { AmPm: string; DD: string; DDD: string; DDDD: string; HH: string; mm: string; MM: string; MMM: string; MMMM: string; ss: string; sss: string; YY: string; YYYY: string; }; export declare function formatDate(date?: DateInput, format?: DateTimeAcceptedFormats): string; export declare function formatDate(date?: DateInput, opts?: FormatDateOptions): string; export declare const fmtDate: typeof formatDate; export {}; //# sourceMappingURL=date.d.ts.map