//! Unified date/time/timezone system for the calcpad engine.
//!
//! This module consolidates all temporal calculations:
//!
//! - **date_math**: Date arithmetic, named dates, calendar durations, formatting
//! - **time_math**: Time arithmetic, 12/24-hour support, time ranges
//! - **timezone**: Timezone resolution (500+ city names, abbreviations, IANA),
//!   cross-zone conversion with DST awareness
//! - **business_days**: Business day calculations, holiday calendars, weekday resolution
//! - **unix**: Unix timestamp <-> human-readable conversions
//! - **relative**: Relative time expressions ("2 hours ago", "next Wednesday")
//!
//! # Usage
//!
//! ```rust
//! use calcpad_engine::datetime::date_math::{add_duration, CalendarDuration, DateFormat};
//! use chrono::NaiveDate;
//!
//! let today = NaiveDate::from_ymd_opt(2026, 3, 17).unwrap();
//! let dur = CalendarDuration { years: 0, months: 0, weeks: 3, days: 2 };
//! let result = add_duration(today, &dur).unwrap();
//! assert_eq!(result, NaiveDate::from_ymd_opt(2026, 4, 9).unwrap());
//! ```

pub mod business_days;
pub mod date_math;
pub mod relative;
pub mod time_math;
pub mod timezone;
pub mod unix;

// Re-export core types for convenience.
pub use business_days::{add_business_days, sub_business_days, us_holidays, BusinessDayConfig};
pub use date_math::{
    add_duration, days_between, format_date, format_day_delta, month_number,
    resolve_named_date, sub_duration, CalendarDuration, DateFormat,
};
pub use relative::{
    eval_day_of_week_ref, eval_named_relative_day, eval_relative_offset, RelativeDirection,
    RelativeResult, RelativeUnit,
};
pub use time_math::{
    add_time_duration, duration_between, format_time, format_time_result, sub_time_duration,
    TimeDuration, TimeFormat, TimeResult,
};
pub use timezone::{
    convert_time, current_time_in, format_zoned_time, resolve_timezone, ZonedTimeResult,
};
pub use unix::{from_timestamp_in_tz, from_timestamp_utc, to_timestamp_in_tz, to_timestamp_utc};
