mod iso_date;
mod iso_datetime;
mod iso_time;
mod iso_timezone;
mod naive_datetime;
pub use self::iso_date::IsoDate;
pub use self::iso_datetime::IsoDateTime;
pub use self::iso_time::IsoTime;
pub use self::iso_timezone::IsoTimezone;
pub use self::naive_datetime::NaiveDateTime;
pub trait Date {
fn year(&self) -> u16;
fn month(&self) -> u8;
fn day(&self) -> u8;
fn to_xsd_date(&self) -> String {
format!("{:04}-{:02}-{:02}", self.year(), self.month(), self.day())
}
}
pub trait Time {
fn hour(&self) -> u8;
fn minute(&self) -> u8;
fn second(&self) -> u8;
}
pub trait DateTime: Date + Time {
fn to_xsd_datetime(&self) -> String;
}