use crate::date::Date;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Holiday {
pub date: Date,
pub name: String,
}
impl Holiday {
pub fn new(date: Date, name: impl Into<String>) -> Self {
Holiday {
date,
name: name.into(),
}
}
pub fn to_tuple(&self) -> (Date, String) {
(self.date, self.name.clone())
}
pub fn into_tuple(self) -> (Date, String) {
(self.date, self.name)
}
}