import { CalendarTime } from './calendar-time'; import { CalendarDate } from './calendar-date'; export declare type CalendarDateTimeOptions = { timezone: string; time?: string; endTimeMissing?: boolean; }; /** * CalendarDateTime centralizes timezone-aware conversions between native Date instances and calendar helpers. */ export declare class CalendarDateTime { private originalDate; private timezone; private date; private time; private constructor(); /** * Build a CalendarDateTime from a native Date while the specific timezone. * * @param {Date} date - The native Date object to convert. * @param {string} timezone - The timezone to apply. * @returns {CalendarDateTime} A timezone-aware CalendarDateTime instance. */ static fromDate(date: Date, timezone: string): CalendarDateTime; /** * Build a CalendarDateTime from a date input (Date or string) and optional time metadata. * * @param {string | Date} date - The input date value (string or Date). * @param {CalendarDateTimeOptions} options - Additional options for time, timezone, seconds, etc. * @returns {CalendarDateTime} A timezone-aware CalendarDateTime instance. */ static fromInitDataSource(date: string | Date, options: CalendarDateTimeOptions): CalendarDateTime; /** * Get the CalendarDate instance representing the date portion. * * @returns {CalendarDate} The CalendarDate object. */ get calendarDate(): CalendarDate; /** * Get the CalendarTime instance representing the time portion. * * @returns {CalendarTime} The CalendarTime object. */ get calendarTime(): CalendarTime; /** * Get a native Date object representing this CalendarDateTime. * * @returns {Date} The native Date object. */ toDate(): Date; /** * Set a new timezone and update CalendarDate/CalendarTime accordingly. * * @param {string} newTimezone - The new timezone to set. */ setTimezone(newTimezone: string): void; /** * Sync CalendarDate and CalendarTime with the current originalDate and timezone. */ private syncDateTime; /** * Convert a Date to the specific timezone. * * @param {Date} date - The date to convert. * @returns {Date} The date adjusted to the specific timezone. */ private convertDateToTimezone; /** * Find a specific part in the Intl.DateTimeFormatPart array. * * @param {Intl.DateTimeFormatPart[]} parts - The array of date/time format parts. * @param {DateTimeFormatPartType} type - The type of part to find (e.g., 'year', 'month'). * @returns {Intl.DateTimeFormatPart | undefined} The matching part, if found. */ private findDateTimeFormatPart; }