pub trait Calendar {
fn short_name() -> &'static str;
fn name() -> &'static str;
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Mixed;
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Gregorian;
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Julian;
impl Calendar for Mixed {
fn short_name() -> &'static str {
"MCAL"
}
fn name() -> &'static str {
"MIXED"
}
}
impl Calendar for Gregorian {
fn short_name() -> &'static str {
"GCAL"
}
fn name() -> &'static str {
"GREGORIAN"
}
}
impl Calendar for Julian {
fn short_name() -> &'static str {
"JCAL"
}
fn name() -> &'static str {
"JULIAN"
}
}