use icu_calendar::{AsCalendar, Date, Iso, Time};
#[derive(Debug)]
#[allow(clippy::exhaustive_structs)] pub struct CustomZonedDateTime<A: AsCalendar, Z> {
pub date: Date<A>,
pub time: Time,
pub zone: Z,
}
impl<A: AsCalendar, Z: Copy> CustomZonedDateTime<A, Z> {
#[inline]
pub fn to_iso(&self) -> CustomZonedDateTime<Iso, Z> {
CustomZonedDateTime {
date: self.date.to_iso(),
time: self.time,
zone: self.zone,
}
}
#[inline]
pub fn to_calendar<A2: AsCalendar>(&self, calendar: A2) -> CustomZonedDateTime<A2, Z> {
CustomZonedDateTime {
date: self.date.to_calendar(calendar),
time: self.time,
zone: self.zone,
}
}
}