diff --git a/gen.py b/gen.py index ec5c034..6c67adf 100644 --- a/gen.py +++ b/gen.py @@ -116,6 +116,8 @@ class Country: years = range(2000, 2031) country = """ +use crate::Error; + /// Two-letter country codes defined in ISO 3166-1 alpha-2 . #[allow(dead_code)] #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord)] @@ -127,15 +129,10 @@ class Country: {%- endfor %} } -impl ToString for Country { - fn to_string(&self) -> String { - match self { -{%- for country in countries %} - #[cfg(feature = "{{country.code}}")] - Country::{{country.code}} => "{{country.code}}".into(), -{%- endfor %} +impl std::fmt::Display for Country { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.as_ref()) } - } } impl AsRef for Country { @@ -153,21 +150,25 @@ class Country: type Err = Error; fn from_str(s: &str) -> std::result::Result { - match s { + Ok(match s { {%- for country in countries %} #[cfg(feature = "{{country.code}}")] - "{{country.code}}" => Ok(Country::{{country.code}}), + "{{country.code}}" => Country::{{country.code}}, {%- endfor %} - _ => Err(Error::CountryNotAvailable), - } + _ => return Err(Error::CountryNotAvailable), + }) } } """ build = """ +use std::collections::HashSet; + +use crate::{data::*, prelude::*, HolidayMap, Result, Year}; + /// Generate holiday map for the specified countries and years. -fn build(countries: Option<&HashSet>, years: Option<&std::ops::Range>) -> Result { +pub fn build(countries: Option<&HashSet>, years: Option<&std::ops::Range>) -> Result { let mut map = HolidayMap::new(); {% for country in countries %} #[cfg(feature = "{{country.code}}")] @@ -180,10 +181,24 @@ class Country: """ +country_mod = """ +mod helper; + +use crate::{prelude::*, Holiday, NaiveDateExt, Result, Year}; +use helper::build_year; + +use chrono::NaiveDate; +use std::collections::BTreeMap; +use std::collections::HashMap; + +{% for country in countries %} +#[cfg(feature = "{{country.code}}")] +pub mod {{country.code|escape}}; +{% endfor %} +""" + build_country = """ -/// {{country}}. -#[cfg(feature = "{{code}}")] -pub mod {{code|escape}} { +//! {{country}} use super::*; /// Generate holiday map for {{country}}. @@ -192,21 +207,24 @@ class Country: let mut map = HashMap::new(); {%- for year in years %} - {% if holiday(years=year) %} - if years.is_none() || years.unwrap().contains(&{{year}}) { - let mut m = BTreeMap::new(); +{% if holiday(years=year) %} + build_year( + years, + {{year}}, + vec![ {% for date, name in holiday(years=year).items() %} - let date = NaiveDate::from_ymd_res({{date|year}}, {{date|month}}, {{date|day}})?; - m.insert(date, Holiday::new(Country::{{code}}, "{{country}}", date, "{{name}}")); + (NaiveDate::from_ymd_res({{date|year}}, {{date|month}}, {{date|day}})?, "{{name}}"), {%- endfor %} - map.insert({{year}}, m); - } + ], + &mut map, + Country::{{code}}, + "{{country}}", + ); {%- endif %} {%- endfor %} Ok(map) } -} """ @@ -234,14 +252,20 @@ def empty_holiday(**kwargs): env.filters["day"] = lambda d: d.day env.filters["escape"] = escape env.filters["lower"] = lower - with open("src/data.rs", "w") as f: + with open("src/country.rs", "w") as f: rendered = env.from_string(country).render(countries=countries) f.write(rendered) + with open("src/build.rs", "w") as f: rendered = env.from_string(build).render(countries=countries) f.write(rendered) - - for country in countries: + + with open("src/data/mod.rs", "w") as f: + rendered = env.from_string(country_mod).render(countries=countries) + f.write(rendered) + + for country in countries: + with open("src/data/{}.rs".format(country.code.lower()), "w") as f: holiday = getattr(holidays, country.code, None) rendered = env.from_string(build_country).render( code=country.code, diff --git a/src/build.rs b/src/build.rs new file mode 100644 index 0000000..caa9ff3 --- /dev/null +++ b/src/build.rs @@ -0,0 +1,518 @@ +use std::collections::HashSet; + +use crate::{data::*, prelude::*, HolidayMap, Result, Year}; + +/// Generate holiday map for the specified countries and years. +pub fn build( + countries: Option<&HashSet>, + years: Option<&std::ops::Range>, +) -> Result { + let mut map = HolidayMap::new(); + + #[cfg(feature = "AO")] + if countries.is_none() || countries.unwrap().contains(&Country::AO) { + map.insert(Country::AO, ao::build(&years)?); + } + + #[cfg(feature = "AR")] + if countries.is_none() || countries.unwrap().contains(&Country::AR) { + map.insert(Country::AR, ar::build(&years)?); + } + + #[cfg(feature = "AM")] + if countries.is_none() || countries.unwrap().contains(&Country::AM) { + map.insert(Country::AM, am::build(&years)?); + } + + #[cfg(feature = "AW")] + if countries.is_none() || countries.unwrap().contains(&Country::AW) { + map.insert(Country::AW, aw::build(&years)?); + } + + #[cfg(feature = "AU")] + if countries.is_none() || countries.unwrap().contains(&Country::AU) { + map.insert(Country::AU, au::build(&years)?); + } + + #[cfg(feature = "AT")] + if countries.is_none() || countries.unwrap().contains(&Country::AT) { + map.insert(Country::AT, at::build(&years)?); + } + + #[cfg(feature = "AZ")] + if countries.is_none() || countries.unwrap().contains(&Country::AZ) { + map.insert(Country::AZ, az::build(&years)?); + } + + #[cfg(feature = "BD")] + if countries.is_none() || countries.unwrap().contains(&Country::BD) { + map.insert(Country::BD, bd::build(&years)?); + } + + #[cfg(feature = "BY")] + if countries.is_none() || countries.unwrap().contains(&Country::BY) { + map.insert(Country::BY, by::build(&years)?); + } + + #[cfg(feature = "BE")] + if countries.is_none() || countries.unwrap().contains(&Country::BE) { + map.insert(Country::BE, be::build(&years)?); + } + + #[cfg(feature = "BO")] + if countries.is_none() || countries.unwrap().contains(&Country::BO) { + map.insert(Country::BO, bo::build(&years)?); + } + + #[cfg(feature = "BA")] + if countries.is_none() || countries.unwrap().contains(&Country::BA) { + map.insert(Country::BA, ba::build(&years)?); + } + + #[cfg(feature = "BW")] + if countries.is_none() || countries.unwrap().contains(&Country::BW) { + map.insert(Country::BW, bw::build(&years)?); + } + + #[cfg(feature = "BR")] + if countries.is_none() || countries.unwrap().contains(&Country::BR) { + map.insert(Country::BR, br::build(&years)?); + } + + #[cfg(feature = "BG")] + if countries.is_none() || countries.unwrap().contains(&Country::BG) { + map.insert(Country::BG, bg::build(&years)?); + } + + #[cfg(feature = "BI")] + if countries.is_none() || countries.unwrap().contains(&Country::BI) { + map.insert(Country::BI, bi::build(&years)?); + } + + #[cfg(feature = "CA")] + if countries.is_none() || countries.unwrap().contains(&Country::CA) { + map.insert(Country::CA, ca::build(&years)?); + } + + #[cfg(feature = "CL")] + if countries.is_none() || countries.unwrap().contains(&Country::CL) { + map.insert(Country::CL, cl::build(&years)?); + } + + #[cfg(feature = "CN")] + if countries.is_none() || countries.unwrap().contains(&Country::CN) { + map.insert(Country::CN, cn::build(&years)?); + } + + #[cfg(feature = "CO")] + if countries.is_none() || countries.unwrap().contains(&Country::CO) { + map.insert(Country::CO, co::build(&years)?); + } + + #[cfg(feature = "HR")] + if countries.is_none() || countries.unwrap().contains(&Country::HR) { + map.insert(Country::HR, hr::build(&years)?); + } + + #[cfg(feature = "CU")] + if countries.is_none() || countries.unwrap().contains(&Country::CU) { + map.insert(Country::CU, cu::build(&years)?); + } + + #[cfg(feature = "CW")] + if countries.is_none() || countries.unwrap().contains(&Country::CW) { + map.insert(Country::CW, cw::build(&years)?); + } + + #[cfg(feature = "CY")] + if countries.is_none() || countries.unwrap().contains(&Country::CY) { + map.insert(Country::CY, cy::build(&years)?); + } + + #[cfg(feature = "CZ")] + if countries.is_none() || countries.unwrap().contains(&Country::CZ) { + map.insert(Country::CZ, cz::build(&years)?); + } + + #[cfg(feature = "DK")] + if countries.is_none() || countries.unwrap().contains(&Country::DK) { + map.insert(Country::DK, dk::build(&years)?); + } + + #[cfg(feature = "DJ")] + if countries.is_none() || countries.unwrap().contains(&Country::DJ) { + map.insert(Country::DJ, dj::build(&years)?); + } + + #[cfg(feature = "DO")] + if countries.is_none() || countries.unwrap().contains(&Country::DO) { + map.insert(Country::DO, r#do::build(&years)?); + } + + #[cfg(feature = "EG")] + if countries.is_none() || countries.unwrap().contains(&Country::EG) { + map.insert(Country::EG, eg::build(&years)?); + } + + #[cfg(feature = "EE")] + if countries.is_none() || countries.unwrap().contains(&Country::EE) { + map.insert(Country::EE, ee::build(&years)?); + } + + #[cfg(feature = "ET")] + if countries.is_none() || countries.unwrap().contains(&Country::ET) { + map.insert(Country::ET, et::build(&years)?); + } + + #[cfg(feature = "FI")] + if countries.is_none() || countries.unwrap().contains(&Country::FI) { + map.insert(Country::FI, fi::build(&years)?); + } + + #[cfg(feature = "FR")] + if countries.is_none() || countries.unwrap().contains(&Country::FR) { + map.insert(Country::FR, fr::build(&years)?); + } + + #[cfg(feature = "GE")] + if countries.is_none() || countries.unwrap().contains(&Country::GE) { + map.insert(Country::GE, ge::build(&years)?); + } + + #[cfg(feature = "DE")] + if countries.is_none() || countries.unwrap().contains(&Country::DE) { + map.insert(Country::DE, de::build(&years)?); + } + + #[cfg(feature = "GR")] + if countries.is_none() || countries.unwrap().contains(&Country::GR) { + map.insert(Country::GR, gr::build(&years)?); + } + + #[cfg(feature = "HN")] + if countries.is_none() || countries.unwrap().contains(&Country::HN) { + map.insert(Country::HN, hn::build(&years)?); + } + + #[cfg(feature = "HK")] + if countries.is_none() || countries.unwrap().contains(&Country::HK) { + map.insert(Country::HK, hk::build(&years)?); + } + + #[cfg(feature = "HU")] + if countries.is_none() || countries.unwrap().contains(&Country::HU) { + map.insert(Country::HU, hu::build(&years)?); + } + + #[cfg(feature = "IS")] + if countries.is_none() || countries.unwrap().contains(&Country::IS) { + map.insert(Country::IS, is::build(&years)?); + } + + #[cfg(feature = "IN")] + if countries.is_none() || countries.unwrap().contains(&Country::IN) { + map.insert(Country::IN, r#in::build(&years)?); + } + + #[cfg(feature = "ID")] + if countries.is_none() || countries.unwrap().contains(&Country::ID) { + map.insert(Country::ID, id::build(&years)?); + } + + #[cfg(feature = "IE")] + if countries.is_none() || countries.unwrap().contains(&Country::IE) { + map.insert(Country::IE, ie::build(&years)?); + } + + #[cfg(feature = "IM")] + if countries.is_none() || countries.unwrap().contains(&Country::IM) { + map.insert(Country::IM, im::build(&years)?); + } + + #[cfg(feature = "IL")] + if countries.is_none() || countries.unwrap().contains(&Country::IL) { + map.insert(Country::IL, il::build(&years)?); + } + + #[cfg(feature = "IT")] + if countries.is_none() || countries.unwrap().contains(&Country::IT) { + map.insert(Country::IT, it::build(&years)?); + } + + #[cfg(feature = "JM")] + if countries.is_none() || countries.unwrap().contains(&Country::JM) { + map.insert(Country::JM, jm::build(&years)?); + } + + #[cfg(feature = "JP")] + if countries.is_none() || countries.unwrap().contains(&Country::JP) { + map.insert(Country::JP, jp::build(&years)?); + } + + #[cfg(feature = "KZ")] + if countries.is_none() || countries.unwrap().contains(&Country::KZ) { + map.insert(Country::KZ, kz::build(&years)?); + } + + #[cfg(feature = "KE")] + if countries.is_none() || countries.unwrap().contains(&Country::KE) { + map.insert(Country::KE, ke::build(&years)?); + } + + #[cfg(feature = "LV")] + if countries.is_none() || countries.unwrap().contains(&Country::LV) { + map.insert(Country::LV, lv::build(&years)?); + } + + #[cfg(feature = "LS")] + if countries.is_none() || countries.unwrap().contains(&Country::LS) { + map.insert(Country::LS, ls::build(&years)?); + } + + #[cfg(feature = "LI")] + if countries.is_none() || countries.unwrap().contains(&Country::LI) { + map.insert(Country::LI, li::build(&years)?); + } + + #[cfg(feature = "LT")] + if countries.is_none() || countries.unwrap().contains(&Country::LT) { + map.insert(Country::LT, lt::build(&years)?); + } + + #[cfg(feature = "LU")] + if countries.is_none() || countries.unwrap().contains(&Country::LU) { + map.insert(Country::LU, lu::build(&years)?); + } + + #[cfg(feature = "MG")] + if countries.is_none() || countries.unwrap().contains(&Country::MG) { + map.insert(Country::MG, mg::build(&years)?); + } + + #[cfg(feature = "MY")] + if countries.is_none() || countries.unwrap().contains(&Country::MY) { + map.insert(Country::MY, my::build(&years)?); + } + + #[cfg(feature = "MW")] + if countries.is_none() || countries.unwrap().contains(&Country::MW) { + map.insert(Country::MW, mw::build(&years)?); + } + + #[cfg(feature = "MT")] + if countries.is_none() || countries.unwrap().contains(&Country::MT) { + map.insert(Country::MT, mt::build(&years)?); + } + + #[cfg(feature = "MX")] + if countries.is_none() || countries.unwrap().contains(&Country::MX) { + map.insert(Country::MX, mx::build(&years)?); + } + + #[cfg(feature = "MD")] + if countries.is_none() || countries.unwrap().contains(&Country::MD) { + map.insert(Country::MD, md::build(&years)?); + } + + #[cfg(feature = "MA")] + if countries.is_none() || countries.unwrap().contains(&Country::MA) { + map.insert(Country::MA, ma::build(&years)?); + } + + #[cfg(feature = "MZ")] + if countries.is_none() || countries.unwrap().contains(&Country::MZ) { + map.insert(Country::MZ, mz::build(&years)?); + } + + #[cfg(feature = "NL")] + if countries.is_none() || countries.unwrap().contains(&Country::NL) { + map.insert(Country::NL, nl::build(&years)?); + } + + #[cfg(feature = "NA")] + if countries.is_none() || countries.unwrap().contains(&Country::NA) { + map.insert(Country::NA, na::build(&years)?); + } + + #[cfg(feature = "NZ")] + if countries.is_none() || countries.unwrap().contains(&Country::NZ) { + map.insert(Country::NZ, nz::build(&years)?); + } + + #[cfg(feature = "NI")] + if countries.is_none() || countries.unwrap().contains(&Country::NI) { + map.insert(Country::NI, ni::build(&years)?); + } + + #[cfg(feature = "NG")] + if countries.is_none() || countries.unwrap().contains(&Country::NG) { + map.insert(Country::NG, ng::build(&years)?); + } + + #[cfg(feature = "MK")] + if countries.is_none() || countries.unwrap().contains(&Country::MK) { + map.insert(Country::MK, mk::build(&years)?); + } + + #[cfg(feature = "NO")] + if countries.is_none() || countries.unwrap().contains(&Country::NO) { + map.insert(Country::NO, no::build(&years)?); + } + + #[cfg(feature = "PK")] + if countries.is_none() || countries.unwrap().contains(&Country::PK) { + map.insert(Country::PK, pk::build(&years)?); + } + + #[cfg(feature = "PY")] + if countries.is_none() || countries.unwrap().contains(&Country::PY) { + map.insert(Country::PY, py::build(&years)?); + } + + #[cfg(feature = "PE")] + if countries.is_none() || countries.unwrap().contains(&Country::PE) { + map.insert(Country::PE, pe::build(&years)?); + } + + #[cfg(feature = "PL")] + if countries.is_none() || countries.unwrap().contains(&Country::PL) { + map.insert(Country::PL, pl::build(&years)?); + } + + #[cfg(feature = "PT")] + if countries.is_none() || countries.unwrap().contains(&Country::PT) { + map.insert(Country::PT, pt::build(&years)?); + } + + #[cfg(feature = "RO")] + if countries.is_none() || countries.unwrap().contains(&Country::RO) { + map.insert(Country::RO, ro::build(&years)?); + } + + #[cfg(feature = "RU")] + if countries.is_none() || countries.unwrap().contains(&Country::RU) { + map.insert(Country::RU, ru::build(&years)?); + } + + #[cfg(feature = "SA")] + if countries.is_none() || countries.unwrap().contains(&Country::SA) { + map.insert(Country::SA, sa::build(&years)?); + } + + #[cfg(feature = "RS")] + if countries.is_none() || countries.unwrap().contains(&Country::RS) { + map.insert(Country::RS, rs::build(&years)?); + } + + #[cfg(feature = "SG")] + if countries.is_none() || countries.unwrap().contains(&Country::SG) { + map.insert(Country::SG, sg::build(&years)?); + } + + #[cfg(feature = "SK")] + if countries.is_none() || countries.unwrap().contains(&Country::SK) { + map.insert(Country::SK, sk::build(&years)?); + } + + #[cfg(feature = "SI")] + if countries.is_none() || countries.unwrap().contains(&Country::SI) { + map.insert(Country::SI, si::build(&years)?); + } + + #[cfg(feature = "ZA")] + if countries.is_none() || countries.unwrap().contains(&Country::ZA) { + map.insert(Country::ZA, za::build(&years)?); + } + + #[cfg(feature = "KR")] + if countries.is_none() || countries.unwrap().contains(&Country::KR) { + map.insert(Country::KR, kr::build(&years)?); + } + + #[cfg(feature = "ES")] + if countries.is_none() || countries.unwrap().contains(&Country::ES) { + map.insert(Country::ES, es::build(&years)?); + } + + #[cfg(feature = "SZ")] + if countries.is_none() || countries.unwrap().contains(&Country::SZ) { + map.insert(Country::SZ, sz::build(&years)?); + } + + #[cfg(feature = "SE")] + if countries.is_none() || countries.unwrap().contains(&Country::SE) { + map.insert(Country::SE, se::build(&years)?); + } + + #[cfg(feature = "CH")] + if countries.is_none() || countries.unwrap().contains(&Country::CH) { + map.insert(Country::CH, ch::build(&years)?); + } + + #[cfg(feature = "TW")] + if countries.is_none() || countries.unwrap().contains(&Country::TW) { + map.insert(Country::TW, tw::build(&years)?); + } + + #[cfg(feature = "TR")] + if countries.is_none() || countries.unwrap().contains(&Country::TR) { + map.insert(Country::TR, tr::build(&years)?); + } + + #[cfg(feature = "TN")] + if countries.is_none() || countries.unwrap().contains(&Country::TN) { + map.insert(Country::TN, tn::build(&years)?); + } + + #[cfg(feature = "UA")] + if countries.is_none() || countries.unwrap().contains(&Country::UA) { + map.insert(Country::UA, ua::build(&years)?); + } + + #[cfg(feature = "AE")] + if countries.is_none() || countries.unwrap().contains(&Country::AE) { + map.insert(Country::AE, ae::build(&years)?); + } + + #[cfg(feature = "GB")] + if countries.is_none() || countries.unwrap().contains(&Country::GB) { + map.insert(Country::GB, gb::build(&years)?); + } + + #[cfg(feature = "US")] + if countries.is_none() || countries.unwrap().contains(&Country::US) { + map.insert(Country::US, us::build(&years)?); + } + + #[cfg(feature = "UY")] + if countries.is_none() || countries.unwrap().contains(&Country::UY) { + map.insert(Country::UY, uy::build(&years)?); + } + + #[cfg(feature = "UZ")] + if countries.is_none() || countries.unwrap().contains(&Country::UZ) { + map.insert(Country::UZ, uz::build(&years)?); + } + + #[cfg(feature = "VE")] + if countries.is_none() || countries.unwrap().contains(&Country::VE) { + map.insert(Country::VE, ve::build(&years)?); + } + + #[cfg(feature = "VN")] + if countries.is_none() || countries.unwrap().contains(&Country::VN) { + map.insert(Country::VN, vn::build(&years)?); + } + + #[cfg(feature = "ZM")] + if countries.is_none() || countries.unwrap().contains(&Country::ZM) { + map.insert(Country::ZM, zm::build(&years)?); + } + + #[cfg(feature = "ZW")] + if countries.is_none() || countries.unwrap().contains(&Country::ZW) { + map.insert(Country::ZW, zw::build(&years)?); + } + + Ok(map) +} diff --git a/src/builder.rs b/src/builder.rs new file mode 100644 index 0000000..50ac7a1 --- /dev/null +++ b/src/builder.rs @@ -0,0 +1,40 @@ +use crate::{build::build, init_holiday, prelude::*, HolidayMap, Result, Year}; +use std::{collections::HashSet, ops::Range}; + +/// Holiday database builder. +#[derive(Default)] +pub struct Builder { + countries: Option>, + years: Option>, +} + +impl Builder { + pub fn new() -> Self { + Self::default() + } + + /// Specify ISO 3166-1 alpha-2 country codes to load. + pub fn countries(mut self, countries: &[Country]) -> Self { + self.countries = Some(countries.iter().copied().collect()); + self + } + + /// Specify range of years to load. + pub fn years(mut self, years: Range) -> Self { + self.years = Some(years); + self + } + + /// Build and get holiday database. + pub fn build(self) -> Result { + let Builder { countries, years } = self; + build(countries.as_ref(), years.as_ref()) + } + + /// Build and initialize holiday database. + pub fn init(self) -> Result<()> { + let Builder { countries, years } = self; + let map = build(countries.as_ref(), years.as_ref())?; + init_holiday(map) + } +} diff --git a/src/country.rs b/src/country.rs new file mode 100644 index 0000000..c5b9d63 --- /dev/null +++ b/src/country.rs @@ -0,0 +1,737 @@ +use crate::Error; + +/// Two-letter country codes defined in ISO 3166-1 alpha-2 . +#[allow(dead_code)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord)] +pub enum Country { + #[cfg(feature = "AO")] + /// Angola + AO, + #[cfg(feature = "AR")] + /// Argentina + AR, + #[cfg(feature = "AM")] + /// Armenia + AM, + #[cfg(feature = "AW")] + /// Aruba + AW, + #[cfg(feature = "AU")] + /// Australia + AU, + #[cfg(feature = "AT")] + /// Austria + AT, + #[cfg(feature = "AZ")] + /// Azerbaijan + AZ, + #[cfg(feature = "BD")] + /// Bangladesh + BD, + #[cfg(feature = "BY")] + /// Belarus + BY, + #[cfg(feature = "BE")] + /// Belgium + BE, + #[cfg(feature = "BO")] + /// Bolivia + BO, + #[cfg(feature = "BA")] + /// Bosnia and Herzegovina + BA, + #[cfg(feature = "BW")] + /// Botswana + BW, + #[cfg(feature = "BR")] + /// Brazil + BR, + #[cfg(feature = "BG")] + /// Bulgaria + BG, + #[cfg(feature = "BI")] + /// Burundi + BI, + #[cfg(feature = "CA")] + /// Canada + CA, + #[cfg(feature = "CL")] + /// Chile + CL, + #[cfg(feature = "CN")] + /// China + CN, + #[cfg(feature = "CO")] + /// Colombia + CO, + #[cfg(feature = "HR")] + /// Croatia + HR, + #[cfg(feature = "CU")] + /// Cuba + CU, + #[cfg(feature = "CW")] + /// Curaçao + CW, + #[cfg(feature = "CY")] + /// Cyprus + CY, + #[cfg(feature = "CZ")] + /// Czechia + CZ, + #[cfg(feature = "DK")] + /// Denmark + DK, + #[cfg(feature = "DJ")] + /// Djibouti + DJ, + #[cfg(feature = "DO")] + /// Dominican Republic + DO, + #[cfg(feature = "EG")] + /// Egypt + EG, + #[cfg(feature = "EE")] + /// Estonia + EE, + #[cfg(feature = "ET")] + /// Ethiopia + ET, + #[cfg(feature = "FI")] + /// Finland + FI, + #[cfg(feature = "FR")] + /// France + FR, + #[cfg(feature = "GE")] + /// Georgia + GE, + #[cfg(feature = "DE")] + /// Germany + DE, + #[cfg(feature = "GR")] + /// Greece + GR, + #[cfg(feature = "HN")] + /// Honduras + HN, + #[cfg(feature = "HK")] + /// Hong Kong + HK, + #[cfg(feature = "HU")] + /// Hungary + HU, + #[cfg(feature = "IS")] + /// Iceland + IS, + #[cfg(feature = "IN")] + /// India + IN, + #[cfg(feature = "ID")] + /// Indonesia + ID, + #[cfg(feature = "IE")] + /// Ireland + IE, + #[cfg(feature = "IM")] + /// Isle of Man + IM, + #[cfg(feature = "IL")] + /// Israel + IL, + #[cfg(feature = "IT")] + /// Italy + IT, + #[cfg(feature = "JM")] + /// Jamaica + JM, + #[cfg(feature = "JP")] + /// Japan + JP, + #[cfg(feature = "KZ")] + /// Kazakhstan + KZ, + #[cfg(feature = "KE")] + /// Kenya + KE, + #[cfg(feature = "LV")] + /// Latvia + LV, + #[cfg(feature = "LS")] + /// Lesotho + LS, + #[cfg(feature = "LI")] + /// Liechtenstein + LI, + #[cfg(feature = "LT")] + /// Lithuania + LT, + #[cfg(feature = "LU")] + /// Luxembourg + LU, + #[cfg(feature = "MG")] + /// Madagascar + MG, + #[cfg(feature = "MY")] + /// Malaysia + MY, + #[cfg(feature = "MW")] + /// Malawi + MW, + #[cfg(feature = "MT")] + /// Malta + MT, + #[cfg(feature = "MX")] + /// Mexico + MX, + #[cfg(feature = "MD")] + /// Moldova + MD, + #[cfg(feature = "MA")] + /// Morocco + MA, + #[cfg(feature = "MZ")] + /// Mozambique + MZ, + #[cfg(feature = "NL")] + /// Netherlands + NL, + #[cfg(feature = "NA")] + /// Namibia + NA, + #[cfg(feature = "NZ")] + /// New Zealand + NZ, + #[cfg(feature = "NI")] + /// Nicaragua + NI, + #[cfg(feature = "NG")] + /// Nigeria + NG, + #[cfg(feature = "MK")] + /// North Macedonia + MK, + #[cfg(feature = "NO")] + /// Norway + NO, + #[cfg(feature = "PK")] + /// Pakistan + PK, + #[cfg(feature = "PY")] + /// Paraguay + PY, + #[cfg(feature = "PE")] + /// Peru + PE, + #[cfg(feature = "PL")] + /// Poland + PL, + #[cfg(feature = "PT")] + /// Portugal + PT, + #[cfg(feature = "RO")] + /// Romania + RO, + #[cfg(feature = "RU")] + /// Russia + RU, + #[cfg(feature = "SA")] + /// Saudi Arabia + SA, + #[cfg(feature = "RS")] + /// Serbia + RS, + #[cfg(feature = "SG")] + /// Singapore + SG, + #[cfg(feature = "SK")] + /// Slovakia + SK, + #[cfg(feature = "SI")] + /// Slovenia + SI, + #[cfg(feature = "ZA")] + /// South Africa + ZA, + #[cfg(feature = "KR")] + /// South Korea + KR, + #[cfg(feature = "ES")] + /// Spain + ES, + #[cfg(feature = "SZ")] + /// Swaziland + SZ, + #[cfg(feature = "SE")] + /// Sweden + SE, + #[cfg(feature = "CH")] + /// Switzerland + CH, + #[cfg(feature = "TW")] + /// Taiwan + TW, + #[cfg(feature = "TR")] + /// Turkey + TR, + #[cfg(feature = "TN")] + /// Tunisia + TN, + #[cfg(feature = "UA")] + /// Ukraine + UA, + #[cfg(feature = "AE")] + /// United Arab Emirates + AE, + #[cfg(feature = "GB")] + /// United Kingdom + GB, + #[cfg(feature = "US")] + /// United States + US, + #[cfg(feature = "UY")] + /// Uruguay + UY, + #[cfg(feature = "UZ")] + /// Uzbekistan + UZ, + #[cfg(feature = "VE")] + /// Venezuela + VE, + #[cfg(feature = "VN")] + /// Vietnam + VN, + #[cfg(feature = "ZM")] + /// Zambia + ZM, + #[cfg(feature = "ZW")] + /// Zimbabwe + ZW, +} + +impl std::fmt::Display for Country { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.as_ref()) + } +} + +impl AsRef for Country { + fn as_ref(&self) -> &str { + match self { + #[cfg(feature = "AO")] + Country::AO => "AO", + #[cfg(feature = "AR")] + Country::AR => "AR", + #[cfg(feature = "AM")] + Country::AM => "AM", + #[cfg(feature = "AW")] + Country::AW => "AW", + #[cfg(feature = "AU")] + Country::AU => "AU", + #[cfg(feature = "AT")] + Country::AT => "AT", + #[cfg(feature = "AZ")] + Country::AZ => "AZ", + #[cfg(feature = "BD")] + Country::BD => "BD", + #[cfg(feature = "BY")] + Country::BY => "BY", + #[cfg(feature = "BE")] + Country::BE => "BE", + #[cfg(feature = "BO")] + Country::BO => "BO", + #[cfg(feature = "BA")] + Country::BA => "BA", + #[cfg(feature = "BW")] + Country::BW => "BW", + #[cfg(feature = "BR")] + Country::BR => "BR", + #[cfg(feature = "BG")] + Country::BG => "BG", + #[cfg(feature = "BI")] + Country::BI => "BI", + #[cfg(feature = "CA")] + Country::CA => "CA", + #[cfg(feature = "CL")] + Country::CL => "CL", + #[cfg(feature = "CN")] + Country::CN => "CN", + #[cfg(feature = "CO")] + Country::CO => "CO", + #[cfg(feature = "HR")] + Country::HR => "HR", + #[cfg(feature = "CU")] + Country::CU => "CU", + #[cfg(feature = "CW")] + Country::CW => "CW", + #[cfg(feature = "CY")] + Country::CY => "CY", + #[cfg(feature = "CZ")] + Country::CZ => "CZ", + #[cfg(feature = "DK")] + Country::DK => "DK", + #[cfg(feature = "DJ")] + Country::DJ => "DJ", + #[cfg(feature = "DO")] + Country::DO => "DO", + #[cfg(feature = "EG")] + Country::EG => "EG", + #[cfg(feature = "EE")] + Country::EE => "EE", + #[cfg(feature = "ET")] + Country::ET => "ET", + #[cfg(feature = "FI")] + Country::FI => "FI", + #[cfg(feature = "FR")] + Country::FR => "FR", + #[cfg(feature = "GE")] + Country::GE => "GE", + #[cfg(feature = "DE")] + Country::DE => "DE", + #[cfg(feature = "GR")] + Country::GR => "GR", + #[cfg(feature = "HN")] + Country::HN => "HN", + #[cfg(feature = "HK")] + Country::HK => "HK", + #[cfg(feature = "HU")] + Country::HU => "HU", + #[cfg(feature = "IS")] + Country::IS => "IS", + #[cfg(feature = "IN")] + Country::IN => "IN", + #[cfg(feature = "ID")] + Country::ID => "ID", + #[cfg(feature = "IE")] + Country::IE => "IE", + #[cfg(feature = "IM")] + Country::IM => "IM", + #[cfg(feature = "IL")] + Country::IL => "IL", + #[cfg(feature = "IT")] + Country::IT => "IT", + #[cfg(feature = "JM")] + Country::JM => "JM", + #[cfg(feature = "JP")] + Country::JP => "JP", + #[cfg(feature = "KZ")] + Country::KZ => "KZ", + #[cfg(feature = "KE")] + Country::KE => "KE", + #[cfg(feature = "LV")] + Country::LV => "LV", + #[cfg(feature = "LS")] + Country::LS => "LS", + #[cfg(feature = "LI")] + Country::LI => "LI", + #[cfg(feature = "LT")] + Country::LT => "LT", + #[cfg(feature = "LU")] + Country::LU => "LU", + #[cfg(feature = "MG")] + Country::MG => "MG", + #[cfg(feature = "MY")] + Country::MY => "MY", + #[cfg(feature = "MW")] + Country::MW => "MW", + #[cfg(feature = "MT")] + Country::MT => "MT", + #[cfg(feature = "MX")] + Country::MX => "MX", + #[cfg(feature = "MD")] + Country::MD => "MD", + #[cfg(feature = "MA")] + Country::MA => "MA", + #[cfg(feature = "MZ")] + Country::MZ => "MZ", + #[cfg(feature = "NL")] + Country::NL => "NL", + #[cfg(feature = "NA")] + Country::NA => "NA", + #[cfg(feature = "NZ")] + Country::NZ => "NZ", + #[cfg(feature = "NI")] + Country::NI => "NI", + #[cfg(feature = "NG")] + Country::NG => "NG", + #[cfg(feature = "MK")] + Country::MK => "MK", + #[cfg(feature = "NO")] + Country::NO => "NO", + #[cfg(feature = "PK")] + Country::PK => "PK", + #[cfg(feature = "PY")] + Country::PY => "PY", + #[cfg(feature = "PE")] + Country::PE => "PE", + #[cfg(feature = "PL")] + Country::PL => "PL", + #[cfg(feature = "PT")] + Country::PT => "PT", + #[cfg(feature = "RO")] + Country::RO => "RO", + #[cfg(feature = "RU")] + Country::RU => "RU", + #[cfg(feature = "SA")] + Country::SA => "SA", + #[cfg(feature = "RS")] + Country::RS => "RS", + #[cfg(feature = "SG")] + Country::SG => "SG", + #[cfg(feature = "SK")] + Country::SK => "SK", + #[cfg(feature = "SI")] + Country::SI => "SI", + #[cfg(feature = "ZA")] + Country::ZA => "ZA", + #[cfg(feature = "KR")] + Country::KR => "KR", + #[cfg(feature = "ES")] + Country::ES => "ES", + #[cfg(feature = "SZ")] + Country::SZ => "SZ", + #[cfg(feature = "SE")] + Country::SE => "SE", + #[cfg(feature = "CH")] + Country::CH => "CH", + #[cfg(feature = "TW")] + Country::TW => "TW", + #[cfg(feature = "TR")] + Country::TR => "TR", + #[cfg(feature = "TN")] + Country::TN => "TN", + #[cfg(feature = "UA")] + Country::UA => "UA", + #[cfg(feature = "AE")] + Country::AE => "AE", + #[cfg(feature = "GB")] + Country::GB => "GB", + #[cfg(feature = "US")] + Country::US => "US", + #[cfg(feature = "UY")] + Country::UY => "UY", + #[cfg(feature = "UZ")] + Country::UZ => "UZ", + #[cfg(feature = "VE")] + Country::VE => "VE", + #[cfg(feature = "VN")] + Country::VN => "VN", + #[cfg(feature = "ZM")] + Country::ZM => "ZM", + #[cfg(feature = "ZW")] + Country::ZW => "ZW", + } + } +} + +impl std::str::FromStr for Country { + type Err = Error; + + fn from_str(s: &str) -> std::result::Result { + Ok(match s { + #[cfg(feature = "AO")] + "AO" => Country::AO, + #[cfg(feature = "AR")] + "AR" => Country::AR, + #[cfg(feature = "AM")] + "AM" => Country::AM, + #[cfg(feature = "AW")] + "AW" => Country::AW, + #[cfg(feature = "AU")] + "AU" => Country::AU, + #[cfg(feature = "AT")] + "AT" => Country::AT, + #[cfg(feature = "AZ")] + "AZ" => Country::AZ, + #[cfg(feature = "BD")] + "BD" => Country::BD, + #[cfg(feature = "BY")] + "BY" => Country::BY, + #[cfg(feature = "BE")] + "BE" => Country::BE, + #[cfg(feature = "BO")] + "BO" => Country::BO, + #[cfg(feature = "BA")] + "BA" => Country::BA, + #[cfg(feature = "BW")] + "BW" => Country::BW, + #[cfg(feature = "BR")] + "BR" => Country::BR, + #[cfg(feature = "BG")] + "BG" => Country::BG, + #[cfg(feature = "BI")] + "BI" => Country::BI, + #[cfg(feature = "CA")] + "CA" => Country::CA, + #[cfg(feature = "CL")] + "CL" => Country::CL, + #[cfg(feature = "CN")] + "CN" => Country::CN, + #[cfg(feature = "CO")] + "CO" => Country::CO, + #[cfg(feature = "HR")] + "HR" => Country::HR, + #[cfg(feature = "CU")] + "CU" => Country::CU, + #[cfg(feature = "CW")] + "CW" => Country::CW, + #[cfg(feature = "CY")] + "CY" => Country::CY, + #[cfg(feature = "CZ")] + "CZ" => Country::CZ, + #[cfg(feature = "DK")] + "DK" => Country::DK, + #[cfg(feature = "DJ")] + "DJ" => Country::DJ, + #[cfg(feature = "DO")] + "DO" => Country::DO, + #[cfg(feature = "EG")] + "EG" => Country::EG, + #[cfg(feature = "EE")] + "EE" => Country::EE, + #[cfg(feature = "ET")] + "ET" => Country::ET, + #[cfg(feature = "FI")] + "FI" => Country::FI, + #[cfg(feature = "FR")] + "FR" => Country::FR, + #[cfg(feature = "GE")] + "GE" => Country::GE, + #[cfg(feature = "DE")] + "DE" => Country::DE, + #[cfg(feature = "GR")] + "GR" => Country::GR, + #[cfg(feature = "HN")] + "HN" => Country::HN, + #[cfg(feature = "HK")] + "HK" => Country::HK, + #[cfg(feature = "HU")] + "HU" => Country::HU, + #[cfg(feature = "IS")] + "IS" => Country::IS, + #[cfg(feature = "IN")] + "IN" => Country::IN, + #[cfg(feature = "ID")] + "ID" => Country::ID, + #[cfg(feature = "IE")] + "IE" => Country::IE, + #[cfg(feature = "IM")] + "IM" => Country::IM, + #[cfg(feature = "IL")] + "IL" => Country::IL, + #[cfg(feature = "IT")] + "IT" => Country::IT, + #[cfg(feature = "JM")] + "JM" => Country::JM, + #[cfg(feature = "JP")] + "JP" => Country::JP, + #[cfg(feature = "KZ")] + "KZ" => Country::KZ, + #[cfg(feature = "KE")] + "KE" => Country::KE, + #[cfg(feature = "LV")] + "LV" => Country::LV, + #[cfg(feature = "LS")] + "LS" => Country::LS, + #[cfg(feature = "LI")] + "LI" => Country::LI, + #[cfg(feature = "LT")] + "LT" => Country::LT, + #[cfg(feature = "LU")] + "LU" => Country::LU, + #[cfg(feature = "MG")] + "MG" => Country::MG, + #[cfg(feature = "MY")] + "MY" => Country::MY, + #[cfg(feature = "MW")] + "MW" => Country::MW, + #[cfg(feature = "MT")] + "MT" => Country::MT, + #[cfg(feature = "MX")] + "MX" => Country::MX, + #[cfg(feature = "MD")] + "MD" => Country::MD, + #[cfg(feature = "MA")] + "MA" => Country::MA, + #[cfg(feature = "MZ")] + "MZ" => Country::MZ, + #[cfg(feature = "NL")] + "NL" => Country::NL, + #[cfg(feature = "NA")] + "NA" => Country::NA, + #[cfg(feature = "NZ")] + "NZ" => Country::NZ, + #[cfg(feature = "NI")] + "NI" => Country::NI, + #[cfg(feature = "NG")] + "NG" => Country::NG, + #[cfg(feature = "MK")] + "MK" => Country::MK, + #[cfg(feature = "NO")] + "NO" => Country::NO, + #[cfg(feature = "PK")] + "PK" => Country::PK, + #[cfg(feature = "PY")] + "PY" => Country::PY, + #[cfg(feature = "PE")] + "PE" => Country::PE, + #[cfg(feature = "PL")] + "PL" => Country::PL, + #[cfg(feature = "PT")] + "PT" => Country::PT, + #[cfg(feature = "RO")] + "RO" => Country::RO, + #[cfg(feature = "RU")] + "RU" => Country::RU, + #[cfg(feature = "SA")] + "SA" => Country::SA, + #[cfg(feature = "RS")] + "RS" => Country::RS, + #[cfg(feature = "SG")] + "SG" => Country::SG, + #[cfg(feature = "SK")] + "SK" => Country::SK, + #[cfg(feature = "SI")] + "SI" => Country::SI, + #[cfg(feature = "ZA")] + "ZA" => Country::ZA, + #[cfg(feature = "KR")] + "KR" => Country::KR, + #[cfg(feature = "ES")] + "ES" => Country::ES, + #[cfg(feature = "SZ")] + "SZ" => Country::SZ, + #[cfg(feature = "SE")] + "SE" => Country::SE, + #[cfg(feature = "CH")] + "CH" => Country::CH, + #[cfg(feature = "TW")] + "TW" => Country::TW, + #[cfg(feature = "TR")] + "TR" => Country::TR, + #[cfg(feature = "TN")] + "TN" => Country::TN, + #[cfg(feature = "UA")] + "UA" => Country::UA, + #[cfg(feature = "AE")] + "AE" => Country::AE, + #[cfg(feature = "GB")] + "GB" => Country::GB, + #[cfg(feature = "US")] + "US" => Country::US, + #[cfg(feature = "UY")] + "UY" => Country::UY, + #[cfg(feature = "UZ")] + "UZ" => Country::UZ, + #[cfg(feature = "VE")] + "VE" => Country::VE, + #[cfg(feature = "VN")] + "VN" => Country::VN, + #[cfg(feature = "ZM")] + "ZM" => Country::ZM, + #[cfg(feature = "ZW")] + "ZW" => Country::ZW, + _ => return Err(Error::CountryNotAvailable), + }) + } +} diff --git a/src/data.rs b/src/data.rs deleted file mode 100644 index 6eb159e..0000000 --- a/src/data.rs +++ /dev/null @@ -1,108973 +0,0 @@ - -/// Two-letter country codes defined in ISO 3166-1 alpha-2 . -#[allow(dead_code)] -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord)] -pub enum Country { - #[cfg(feature = "AO")] - /// Angola - AO, - #[cfg(feature = "AR")] - /// Argentina - AR, - #[cfg(feature = "AM")] - /// Armenia - AM, - #[cfg(feature = "AW")] - /// Aruba - AW, - #[cfg(feature = "AU")] - /// Australia - AU, - #[cfg(feature = "AT")] - /// Austria - AT, - #[cfg(feature = "AZ")] - /// Azerbaijan - AZ, - #[cfg(feature = "BD")] - /// Bangladesh - BD, - #[cfg(feature = "BY")] - /// Belarus - BY, - #[cfg(feature = "BE")] - /// Belgium - BE, - #[cfg(feature = "BO")] - /// Bolivia - BO, - #[cfg(feature = "BA")] - /// Bosnia and Herzegovina - BA, - #[cfg(feature = "BW")] - /// Botswana - BW, - #[cfg(feature = "BR")] - /// Brazil - BR, - #[cfg(feature = "BG")] - /// Bulgaria - BG, - #[cfg(feature = "BI")] - /// Burundi - BI, - #[cfg(feature = "CA")] - /// Canada - CA, - #[cfg(feature = "CL")] - /// Chile - CL, - #[cfg(feature = "CN")] - /// China - CN, - #[cfg(feature = "CO")] - /// Colombia - CO, - #[cfg(feature = "HR")] - /// Croatia - HR, - #[cfg(feature = "CU")] - /// Cuba - CU, - #[cfg(feature = "CW")] - /// Curaçao - CW, - #[cfg(feature = "CY")] - /// Cyprus - CY, - #[cfg(feature = "CZ")] - /// Czechia - CZ, - #[cfg(feature = "DK")] - /// Denmark - DK, - #[cfg(feature = "DJ")] - /// Djibouti - DJ, - #[cfg(feature = "DO")] - /// Dominican Republic - DO, - #[cfg(feature = "EG")] - /// Egypt - EG, - #[cfg(feature = "EE")] - /// Estonia - EE, - #[cfg(feature = "ET")] - /// Ethiopia - ET, - #[cfg(feature = "FI")] - /// Finland - FI, - #[cfg(feature = "FR")] - /// France - FR, - #[cfg(feature = "GE")] - /// Georgia - GE, - #[cfg(feature = "DE")] - /// Germany - DE, - #[cfg(feature = "GR")] - /// Greece - GR, - #[cfg(feature = "HN")] - /// Honduras - HN, - #[cfg(feature = "HK")] - /// Hong Kong - HK, - #[cfg(feature = "HU")] - /// Hungary - HU, - #[cfg(feature = "IS")] - /// Iceland - IS, - #[cfg(feature = "IN")] - /// India - IN, - #[cfg(feature = "ID")] - /// Indonesia - ID, - #[cfg(feature = "IE")] - /// Ireland - IE, - #[cfg(feature = "IM")] - /// Isle of Man - IM, - #[cfg(feature = "IL")] - /// Israel - IL, - #[cfg(feature = "IT")] - /// Italy - IT, - #[cfg(feature = "JM")] - /// Jamaica - JM, - #[cfg(feature = "JP")] - /// Japan - JP, - #[cfg(feature = "KZ")] - /// Kazakhstan - KZ, - #[cfg(feature = "KE")] - /// Kenya - KE, - #[cfg(feature = "LV")] - /// Latvia - LV, - #[cfg(feature = "LS")] - /// Lesotho - LS, - #[cfg(feature = "LI")] - /// Liechtenstein - LI, - #[cfg(feature = "LT")] - /// Lithuania - LT, - #[cfg(feature = "LU")] - /// Luxembourg - LU, - #[cfg(feature = "MG")] - /// Madagascar - MG, - #[cfg(feature = "MY")] - /// Malaysia - MY, - #[cfg(feature = "MW")] - /// Malawi - MW, - #[cfg(feature = "MT")] - /// Malta - MT, - #[cfg(feature = "MX")] - /// Mexico - MX, - #[cfg(feature = "MD")] - /// Moldova - MD, - #[cfg(feature = "MA")] - /// Morocco - MA, - #[cfg(feature = "MZ")] - /// Mozambique - MZ, - #[cfg(feature = "NL")] - /// Netherlands - NL, - #[cfg(feature = "NA")] - /// Namibia - NA, - #[cfg(feature = "NZ")] - /// New Zealand - NZ, - #[cfg(feature = "NI")] - /// Nicaragua - NI, - #[cfg(feature = "NG")] - /// Nigeria - NG, - #[cfg(feature = "MK")] - /// North Macedonia - MK, - #[cfg(feature = "NO")] - /// Norway - NO, - #[cfg(feature = "PK")] - /// Pakistan - PK, - #[cfg(feature = "PY")] - /// Paraguay - PY, - #[cfg(feature = "PE")] - /// Peru - PE, - #[cfg(feature = "PL")] - /// Poland - PL, - #[cfg(feature = "PT")] - /// Portugal - PT, - #[cfg(feature = "RO")] - /// Romania - RO, - #[cfg(feature = "RU")] - /// Russia - RU, - #[cfg(feature = "SA")] - /// Saudi Arabia - SA, - #[cfg(feature = "RS")] - /// Serbia - RS, - #[cfg(feature = "SG")] - /// Singapore - SG, - #[cfg(feature = "SK")] - /// Slovakia - SK, - #[cfg(feature = "SI")] - /// Slovenia - SI, - #[cfg(feature = "ZA")] - /// South Africa - ZA, - #[cfg(feature = "KR")] - /// South Korea - KR, - #[cfg(feature = "ES")] - /// Spain - ES, - #[cfg(feature = "SZ")] - /// Swaziland - SZ, - #[cfg(feature = "SE")] - /// Sweden - SE, - #[cfg(feature = "CH")] - /// Switzerland - CH, - #[cfg(feature = "TW")] - /// Taiwan - TW, - #[cfg(feature = "TR")] - /// Turkey - TR, - #[cfg(feature = "TN")] - /// Tunisia - TN, - #[cfg(feature = "UA")] - /// Ukraine - UA, - #[cfg(feature = "AE")] - /// United Arab Emirates - AE, - #[cfg(feature = "GB")] - /// United Kingdom - GB, - #[cfg(feature = "US")] - /// United States - US, - #[cfg(feature = "UY")] - /// Uruguay - UY, - #[cfg(feature = "UZ")] - /// Uzbekistan - UZ, - #[cfg(feature = "VE")] - /// Venezuela - VE, - #[cfg(feature = "VN")] - /// Vietnam - VN, - #[cfg(feature = "ZM")] - /// Zambia - ZM, - #[cfg(feature = "ZW")] - /// Zimbabwe - ZW, -} - -impl ToString for Country { - fn to_string(&self) -> String { - match self { - #[cfg(feature = "AO")] - Country::AO => "AO".into(), - #[cfg(feature = "AR")] - Country::AR => "AR".into(), - #[cfg(feature = "AM")] - Country::AM => "AM".into(), - #[cfg(feature = "AW")] - Country::AW => "AW".into(), - #[cfg(feature = "AU")] - Country::AU => "AU".into(), - #[cfg(feature = "AT")] - Country::AT => "AT".into(), - #[cfg(feature = "AZ")] - Country::AZ => "AZ".into(), - #[cfg(feature = "BD")] - Country::BD => "BD".into(), - #[cfg(feature = "BY")] - Country::BY => "BY".into(), - #[cfg(feature = "BE")] - Country::BE => "BE".into(), - #[cfg(feature = "BO")] - Country::BO => "BO".into(), - #[cfg(feature = "BA")] - Country::BA => "BA".into(), - #[cfg(feature = "BW")] - Country::BW => "BW".into(), - #[cfg(feature = "BR")] - Country::BR => "BR".into(), - #[cfg(feature = "BG")] - Country::BG => "BG".into(), - #[cfg(feature = "BI")] - Country::BI => "BI".into(), - #[cfg(feature = "CA")] - Country::CA => "CA".into(), - #[cfg(feature = "CL")] - Country::CL => "CL".into(), - #[cfg(feature = "CN")] - Country::CN => "CN".into(), - #[cfg(feature = "CO")] - Country::CO => "CO".into(), - #[cfg(feature = "HR")] - Country::HR => "HR".into(), - #[cfg(feature = "CU")] - Country::CU => "CU".into(), - #[cfg(feature = "CW")] - Country::CW => "CW".into(), - #[cfg(feature = "CY")] - Country::CY => "CY".into(), - #[cfg(feature = "CZ")] - Country::CZ => "CZ".into(), - #[cfg(feature = "DK")] - Country::DK => "DK".into(), - #[cfg(feature = "DJ")] - Country::DJ => "DJ".into(), - #[cfg(feature = "DO")] - Country::DO => "DO".into(), - #[cfg(feature = "EG")] - Country::EG => "EG".into(), - #[cfg(feature = "EE")] - Country::EE => "EE".into(), - #[cfg(feature = "ET")] - Country::ET => "ET".into(), - #[cfg(feature = "FI")] - Country::FI => "FI".into(), - #[cfg(feature = "FR")] - Country::FR => "FR".into(), - #[cfg(feature = "GE")] - Country::GE => "GE".into(), - #[cfg(feature = "DE")] - Country::DE => "DE".into(), - #[cfg(feature = "GR")] - Country::GR => "GR".into(), - #[cfg(feature = "HN")] - Country::HN => "HN".into(), - #[cfg(feature = "HK")] - Country::HK => "HK".into(), - #[cfg(feature = "HU")] - Country::HU => "HU".into(), - #[cfg(feature = "IS")] - Country::IS => "IS".into(), - #[cfg(feature = "IN")] - Country::IN => "IN".into(), - #[cfg(feature = "ID")] - Country::ID => "ID".into(), - #[cfg(feature = "IE")] - Country::IE => "IE".into(), - #[cfg(feature = "IM")] - Country::IM => "IM".into(), - #[cfg(feature = "IL")] - Country::IL => "IL".into(), - #[cfg(feature = "IT")] - Country::IT => "IT".into(), - #[cfg(feature = "JM")] - Country::JM => "JM".into(), - #[cfg(feature = "JP")] - Country::JP => "JP".into(), - #[cfg(feature = "KZ")] - Country::KZ => "KZ".into(), - #[cfg(feature = "KE")] - Country::KE => "KE".into(), - #[cfg(feature = "LV")] - Country::LV => "LV".into(), - #[cfg(feature = "LS")] - Country::LS => "LS".into(), - #[cfg(feature = "LI")] - Country::LI => "LI".into(), - #[cfg(feature = "LT")] - Country::LT => "LT".into(), - #[cfg(feature = "LU")] - Country::LU => "LU".into(), - #[cfg(feature = "MG")] - Country::MG => "MG".into(), - #[cfg(feature = "MY")] - Country::MY => "MY".into(), - #[cfg(feature = "MW")] - Country::MW => "MW".into(), - #[cfg(feature = "MT")] - Country::MT => "MT".into(), - #[cfg(feature = "MX")] - Country::MX => "MX".into(), - #[cfg(feature = "MD")] - Country::MD => "MD".into(), - #[cfg(feature = "MA")] - Country::MA => "MA".into(), - #[cfg(feature = "MZ")] - Country::MZ => "MZ".into(), - #[cfg(feature = "NL")] - Country::NL => "NL".into(), - #[cfg(feature = "NA")] - Country::NA => "NA".into(), - #[cfg(feature = "NZ")] - Country::NZ => "NZ".into(), - #[cfg(feature = "NI")] - Country::NI => "NI".into(), - #[cfg(feature = "NG")] - Country::NG => "NG".into(), - #[cfg(feature = "MK")] - Country::MK => "MK".into(), - #[cfg(feature = "NO")] - Country::NO => "NO".into(), - #[cfg(feature = "PK")] - Country::PK => "PK".into(), - #[cfg(feature = "PY")] - Country::PY => "PY".into(), - #[cfg(feature = "PE")] - Country::PE => "PE".into(), - #[cfg(feature = "PL")] - Country::PL => "PL".into(), - #[cfg(feature = "PT")] - Country::PT => "PT".into(), - #[cfg(feature = "RO")] - Country::RO => "RO".into(), - #[cfg(feature = "RU")] - Country::RU => "RU".into(), - #[cfg(feature = "SA")] - Country::SA => "SA".into(), - #[cfg(feature = "RS")] - Country::RS => "RS".into(), - #[cfg(feature = "SG")] - Country::SG => "SG".into(), - #[cfg(feature = "SK")] - Country::SK => "SK".into(), - #[cfg(feature = "SI")] - Country::SI => "SI".into(), - #[cfg(feature = "ZA")] - Country::ZA => "ZA".into(), - #[cfg(feature = "KR")] - Country::KR => "KR".into(), - #[cfg(feature = "ES")] - Country::ES => "ES".into(), - #[cfg(feature = "SZ")] - Country::SZ => "SZ".into(), - #[cfg(feature = "SE")] - Country::SE => "SE".into(), - #[cfg(feature = "CH")] - Country::CH => "CH".into(), - #[cfg(feature = "TW")] - Country::TW => "TW".into(), - #[cfg(feature = "TR")] - Country::TR => "TR".into(), - #[cfg(feature = "TN")] - Country::TN => "TN".into(), - #[cfg(feature = "UA")] - Country::UA => "UA".into(), - #[cfg(feature = "AE")] - Country::AE => "AE".into(), - #[cfg(feature = "GB")] - Country::GB => "GB".into(), - #[cfg(feature = "US")] - Country::US => "US".into(), - #[cfg(feature = "UY")] - Country::UY => "UY".into(), - #[cfg(feature = "UZ")] - Country::UZ => "UZ".into(), - #[cfg(feature = "VE")] - Country::VE => "VE".into(), - #[cfg(feature = "VN")] - Country::VN => "VN".into(), - #[cfg(feature = "ZM")] - Country::ZM => "ZM".into(), - #[cfg(feature = "ZW")] - Country::ZW => "ZW".into(), - } - } -} - -impl AsRef for Country { - fn as_ref(&self) -> &str { - match self { - #[cfg(feature = "AO")] - Country::AO => "AO", - #[cfg(feature = "AR")] - Country::AR => "AR", - #[cfg(feature = "AM")] - Country::AM => "AM", - #[cfg(feature = "AW")] - Country::AW => "AW", - #[cfg(feature = "AU")] - Country::AU => "AU", - #[cfg(feature = "AT")] - Country::AT => "AT", - #[cfg(feature = "AZ")] - Country::AZ => "AZ", - #[cfg(feature = "BD")] - Country::BD => "BD", - #[cfg(feature = "BY")] - Country::BY => "BY", - #[cfg(feature = "BE")] - Country::BE => "BE", - #[cfg(feature = "BO")] - Country::BO => "BO", - #[cfg(feature = "BA")] - Country::BA => "BA", - #[cfg(feature = "BW")] - Country::BW => "BW", - #[cfg(feature = "BR")] - Country::BR => "BR", - #[cfg(feature = "BG")] - Country::BG => "BG", - #[cfg(feature = "BI")] - Country::BI => "BI", - #[cfg(feature = "CA")] - Country::CA => "CA", - #[cfg(feature = "CL")] - Country::CL => "CL", - #[cfg(feature = "CN")] - Country::CN => "CN", - #[cfg(feature = "CO")] - Country::CO => "CO", - #[cfg(feature = "HR")] - Country::HR => "HR", - #[cfg(feature = "CU")] - Country::CU => "CU", - #[cfg(feature = "CW")] - Country::CW => "CW", - #[cfg(feature = "CY")] - Country::CY => "CY", - #[cfg(feature = "CZ")] - Country::CZ => "CZ", - #[cfg(feature = "DK")] - Country::DK => "DK", - #[cfg(feature = "DJ")] - Country::DJ => "DJ", - #[cfg(feature = "DO")] - Country::DO => "DO", - #[cfg(feature = "EG")] - Country::EG => "EG", - #[cfg(feature = "EE")] - Country::EE => "EE", - #[cfg(feature = "ET")] - Country::ET => "ET", - #[cfg(feature = "FI")] - Country::FI => "FI", - #[cfg(feature = "FR")] - Country::FR => "FR", - #[cfg(feature = "GE")] - Country::GE => "GE", - #[cfg(feature = "DE")] - Country::DE => "DE", - #[cfg(feature = "GR")] - Country::GR => "GR", - #[cfg(feature = "HN")] - Country::HN => "HN", - #[cfg(feature = "HK")] - Country::HK => "HK", - #[cfg(feature = "HU")] - Country::HU => "HU", - #[cfg(feature = "IS")] - Country::IS => "IS", - #[cfg(feature = "IN")] - Country::IN => "IN", - #[cfg(feature = "ID")] - Country::ID => "ID", - #[cfg(feature = "IE")] - Country::IE => "IE", - #[cfg(feature = "IM")] - Country::IM => "IM", - #[cfg(feature = "IL")] - Country::IL => "IL", - #[cfg(feature = "IT")] - Country::IT => "IT", - #[cfg(feature = "JM")] - Country::JM => "JM", - #[cfg(feature = "JP")] - Country::JP => "JP", - #[cfg(feature = "KZ")] - Country::KZ => "KZ", - #[cfg(feature = "KE")] - Country::KE => "KE", - #[cfg(feature = "LV")] - Country::LV => "LV", - #[cfg(feature = "LS")] - Country::LS => "LS", - #[cfg(feature = "LI")] - Country::LI => "LI", - #[cfg(feature = "LT")] - Country::LT => "LT", - #[cfg(feature = "LU")] - Country::LU => "LU", - #[cfg(feature = "MG")] - Country::MG => "MG", - #[cfg(feature = "MY")] - Country::MY => "MY", - #[cfg(feature = "MW")] - Country::MW => "MW", - #[cfg(feature = "MT")] - Country::MT => "MT", - #[cfg(feature = "MX")] - Country::MX => "MX", - #[cfg(feature = "MD")] - Country::MD => "MD", - #[cfg(feature = "MA")] - Country::MA => "MA", - #[cfg(feature = "MZ")] - Country::MZ => "MZ", - #[cfg(feature = "NL")] - Country::NL => "NL", - #[cfg(feature = "NA")] - Country::NA => "NA", - #[cfg(feature = "NZ")] - Country::NZ => "NZ", - #[cfg(feature = "NI")] - Country::NI => "NI", - #[cfg(feature = "NG")] - Country::NG => "NG", - #[cfg(feature = "MK")] - Country::MK => "MK", - #[cfg(feature = "NO")] - Country::NO => "NO", - #[cfg(feature = "PK")] - Country::PK => "PK", - #[cfg(feature = "PY")] - Country::PY => "PY", - #[cfg(feature = "PE")] - Country::PE => "PE", - #[cfg(feature = "PL")] - Country::PL => "PL", - #[cfg(feature = "PT")] - Country::PT => "PT", - #[cfg(feature = "RO")] - Country::RO => "RO", - #[cfg(feature = "RU")] - Country::RU => "RU", - #[cfg(feature = "SA")] - Country::SA => "SA", - #[cfg(feature = "RS")] - Country::RS => "RS", - #[cfg(feature = "SG")] - Country::SG => "SG", - #[cfg(feature = "SK")] - Country::SK => "SK", - #[cfg(feature = "SI")] - Country::SI => "SI", - #[cfg(feature = "ZA")] - Country::ZA => "ZA", - #[cfg(feature = "KR")] - Country::KR => "KR", - #[cfg(feature = "ES")] - Country::ES => "ES", - #[cfg(feature = "SZ")] - Country::SZ => "SZ", - #[cfg(feature = "SE")] - Country::SE => "SE", - #[cfg(feature = "CH")] - Country::CH => "CH", - #[cfg(feature = "TW")] - Country::TW => "TW", - #[cfg(feature = "TR")] - Country::TR => "TR", - #[cfg(feature = "TN")] - Country::TN => "TN", - #[cfg(feature = "UA")] - Country::UA => "UA", - #[cfg(feature = "AE")] - Country::AE => "AE", - #[cfg(feature = "GB")] - Country::GB => "GB", - #[cfg(feature = "US")] - Country::US => "US", - #[cfg(feature = "UY")] - Country::UY => "UY", - #[cfg(feature = "UZ")] - Country::UZ => "UZ", - #[cfg(feature = "VE")] - Country::VE => "VE", - #[cfg(feature = "VN")] - Country::VN => "VN", - #[cfg(feature = "ZM")] - Country::ZM => "ZM", - #[cfg(feature = "ZW")] - Country::ZW => "ZW", - } - } -} - -impl std::str::FromStr for Country { - type Err = Error; - - fn from_str(s: &str) -> std::result::Result { - match s { - #[cfg(feature = "AO")] - "AO" => Ok(Country::AO), - #[cfg(feature = "AR")] - "AR" => Ok(Country::AR), - #[cfg(feature = "AM")] - "AM" => Ok(Country::AM), - #[cfg(feature = "AW")] - "AW" => Ok(Country::AW), - #[cfg(feature = "AU")] - "AU" => Ok(Country::AU), - #[cfg(feature = "AT")] - "AT" => Ok(Country::AT), - #[cfg(feature = "AZ")] - "AZ" => Ok(Country::AZ), - #[cfg(feature = "BD")] - "BD" => Ok(Country::BD), - #[cfg(feature = "BY")] - "BY" => Ok(Country::BY), - #[cfg(feature = "BE")] - "BE" => Ok(Country::BE), - #[cfg(feature = "BO")] - "BO" => Ok(Country::BO), - #[cfg(feature = "BA")] - "BA" => Ok(Country::BA), - #[cfg(feature = "BW")] - "BW" => Ok(Country::BW), - #[cfg(feature = "BR")] - "BR" => Ok(Country::BR), - #[cfg(feature = "BG")] - "BG" => Ok(Country::BG), - #[cfg(feature = "BI")] - "BI" => Ok(Country::BI), - #[cfg(feature = "CA")] - "CA" => Ok(Country::CA), - #[cfg(feature = "CL")] - "CL" => Ok(Country::CL), - #[cfg(feature = "CN")] - "CN" => Ok(Country::CN), - #[cfg(feature = "CO")] - "CO" => Ok(Country::CO), - #[cfg(feature = "HR")] - "HR" => Ok(Country::HR), - #[cfg(feature = "CU")] - "CU" => Ok(Country::CU), - #[cfg(feature = "CW")] - "CW" => Ok(Country::CW), - #[cfg(feature = "CY")] - "CY" => Ok(Country::CY), - #[cfg(feature = "CZ")] - "CZ" => Ok(Country::CZ), - #[cfg(feature = "DK")] - "DK" => Ok(Country::DK), - #[cfg(feature = "DJ")] - "DJ" => Ok(Country::DJ), - #[cfg(feature = "DO")] - "DO" => Ok(Country::DO), - #[cfg(feature = "EG")] - "EG" => Ok(Country::EG), - #[cfg(feature = "EE")] - "EE" => Ok(Country::EE), - #[cfg(feature = "ET")] - "ET" => Ok(Country::ET), - #[cfg(feature = "FI")] - "FI" => Ok(Country::FI), - #[cfg(feature = "FR")] - "FR" => Ok(Country::FR), - #[cfg(feature = "GE")] - "GE" => Ok(Country::GE), - #[cfg(feature = "DE")] - "DE" => Ok(Country::DE), - #[cfg(feature = "GR")] - "GR" => Ok(Country::GR), - #[cfg(feature = "HN")] - "HN" => Ok(Country::HN), - #[cfg(feature = "HK")] - "HK" => Ok(Country::HK), - #[cfg(feature = "HU")] - "HU" => Ok(Country::HU), - #[cfg(feature = "IS")] - "IS" => Ok(Country::IS), - #[cfg(feature = "IN")] - "IN" => Ok(Country::IN), - #[cfg(feature = "ID")] - "ID" => Ok(Country::ID), - #[cfg(feature = "IE")] - "IE" => Ok(Country::IE), - #[cfg(feature = "IM")] - "IM" => Ok(Country::IM), - #[cfg(feature = "IL")] - "IL" => Ok(Country::IL), - #[cfg(feature = "IT")] - "IT" => Ok(Country::IT), - #[cfg(feature = "JM")] - "JM" => Ok(Country::JM), - #[cfg(feature = "JP")] - "JP" => Ok(Country::JP), - #[cfg(feature = "KZ")] - "KZ" => Ok(Country::KZ), - #[cfg(feature = "KE")] - "KE" => Ok(Country::KE), - #[cfg(feature = "LV")] - "LV" => Ok(Country::LV), - #[cfg(feature = "LS")] - "LS" => Ok(Country::LS), - #[cfg(feature = "LI")] - "LI" => Ok(Country::LI), - #[cfg(feature = "LT")] - "LT" => Ok(Country::LT), - #[cfg(feature = "LU")] - "LU" => Ok(Country::LU), - #[cfg(feature = "MG")] - "MG" => Ok(Country::MG), - #[cfg(feature = "MY")] - "MY" => Ok(Country::MY), - #[cfg(feature = "MW")] - "MW" => Ok(Country::MW), - #[cfg(feature = "MT")] - "MT" => Ok(Country::MT), - #[cfg(feature = "MX")] - "MX" => Ok(Country::MX), - #[cfg(feature = "MD")] - "MD" => Ok(Country::MD), - #[cfg(feature = "MA")] - "MA" => Ok(Country::MA), - #[cfg(feature = "MZ")] - "MZ" => Ok(Country::MZ), - #[cfg(feature = "NL")] - "NL" => Ok(Country::NL), - #[cfg(feature = "NA")] - "NA" => Ok(Country::NA), - #[cfg(feature = "NZ")] - "NZ" => Ok(Country::NZ), - #[cfg(feature = "NI")] - "NI" => Ok(Country::NI), - #[cfg(feature = "NG")] - "NG" => Ok(Country::NG), - #[cfg(feature = "MK")] - "MK" => Ok(Country::MK), - #[cfg(feature = "NO")] - "NO" => Ok(Country::NO), - #[cfg(feature = "PK")] - "PK" => Ok(Country::PK), - #[cfg(feature = "PY")] - "PY" => Ok(Country::PY), - #[cfg(feature = "PE")] - "PE" => Ok(Country::PE), - #[cfg(feature = "PL")] - "PL" => Ok(Country::PL), - #[cfg(feature = "PT")] - "PT" => Ok(Country::PT), - #[cfg(feature = "RO")] - "RO" => Ok(Country::RO), - #[cfg(feature = "RU")] - "RU" => Ok(Country::RU), - #[cfg(feature = "SA")] - "SA" => Ok(Country::SA), - #[cfg(feature = "RS")] - "RS" => Ok(Country::RS), - #[cfg(feature = "SG")] - "SG" => Ok(Country::SG), - #[cfg(feature = "SK")] - "SK" => Ok(Country::SK), - #[cfg(feature = "SI")] - "SI" => Ok(Country::SI), - #[cfg(feature = "ZA")] - "ZA" => Ok(Country::ZA), - #[cfg(feature = "KR")] - "KR" => Ok(Country::KR), - #[cfg(feature = "ES")] - "ES" => Ok(Country::ES), - #[cfg(feature = "SZ")] - "SZ" => Ok(Country::SZ), - #[cfg(feature = "SE")] - "SE" => Ok(Country::SE), - #[cfg(feature = "CH")] - "CH" => Ok(Country::CH), - #[cfg(feature = "TW")] - "TW" => Ok(Country::TW), - #[cfg(feature = "TR")] - "TR" => Ok(Country::TR), - #[cfg(feature = "TN")] - "TN" => Ok(Country::TN), - #[cfg(feature = "UA")] - "UA" => Ok(Country::UA), - #[cfg(feature = "AE")] - "AE" => Ok(Country::AE), - #[cfg(feature = "GB")] - "GB" => Ok(Country::GB), - #[cfg(feature = "US")] - "US" => Ok(Country::US), - #[cfg(feature = "UY")] - "UY" => Ok(Country::UY), - #[cfg(feature = "UZ")] - "UZ" => Ok(Country::UZ), - #[cfg(feature = "VE")] - "VE" => Ok(Country::VE), - #[cfg(feature = "VN")] - "VN" => Ok(Country::VN), - #[cfg(feature = "ZM")] - "ZM" => Ok(Country::ZM), - #[cfg(feature = "ZW")] - "ZW" => Ok(Country::ZW), - _ => Err(Error::CountryNotAvailable), - } - } -} - -/// Generate holiday map for the specified countries and years. -fn build(countries: Option<&HashSet>, years: Option<&std::ops::Range>) -> Result { - let mut map = HolidayMap::new(); - - #[cfg(feature = "AO")] - if countries.is_none() || countries.unwrap().contains(&Country::AO) { - map.insert(Country::AO, ao::build(&years)?); - } - - #[cfg(feature = "AR")] - if countries.is_none() || countries.unwrap().contains(&Country::AR) { - map.insert(Country::AR, ar::build(&years)?); - } - - #[cfg(feature = "AM")] - if countries.is_none() || countries.unwrap().contains(&Country::AM) { - map.insert(Country::AM, am::build(&years)?); - } - - #[cfg(feature = "AW")] - if countries.is_none() || countries.unwrap().contains(&Country::AW) { - map.insert(Country::AW, aw::build(&years)?); - } - - #[cfg(feature = "AU")] - if countries.is_none() || countries.unwrap().contains(&Country::AU) { - map.insert(Country::AU, au::build(&years)?); - } - - #[cfg(feature = "AT")] - if countries.is_none() || countries.unwrap().contains(&Country::AT) { - map.insert(Country::AT, at::build(&years)?); - } - - #[cfg(feature = "AZ")] - if countries.is_none() || countries.unwrap().contains(&Country::AZ) { - map.insert(Country::AZ, az::build(&years)?); - } - - #[cfg(feature = "BD")] - if countries.is_none() || countries.unwrap().contains(&Country::BD) { - map.insert(Country::BD, bd::build(&years)?); - } - - #[cfg(feature = "BY")] - if countries.is_none() || countries.unwrap().contains(&Country::BY) { - map.insert(Country::BY, by::build(&years)?); - } - - #[cfg(feature = "BE")] - if countries.is_none() || countries.unwrap().contains(&Country::BE) { - map.insert(Country::BE, be::build(&years)?); - } - - #[cfg(feature = "BO")] - if countries.is_none() || countries.unwrap().contains(&Country::BO) { - map.insert(Country::BO, bo::build(&years)?); - } - - #[cfg(feature = "BA")] - if countries.is_none() || countries.unwrap().contains(&Country::BA) { - map.insert(Country::BA, ba::build(&years)?); - } - - #[cfg(feature = "BW")] - if countries.is_none() || countries.unwrap().contains(&Country::BW) { - map.insert(Country::BW, bw::build(&years)?); - } - - #[cfg(feature = "BR")] - if countries.is_none() || countries.unwrap().contains(&Country::BR) { - map.insert(Country::BR, br::build(&years)?); - } - - #[cfg(feature = "BG")] - if countries.is_none() || countries.unwrap().contains(&Country::BG) { - map.insert(Country::BG, bg::build(&years)?); - } - - #[cfg(feature = "BI")] - if countries.is_none() || countries.unwrap().contains(&Country::BI) { - map.insert(Country::BI, bi::build(&years)?); - } - - #[cfg(feature = "CA")] - if countries.is_none() || countries.unwrap().contains(&Country::CA) { - map.insert(Country::CA, ca::build(&years)?); - } - - #[cfg(feature = "CL")] - if countries.is_none() || countries.unwrap().contains(&Country::CL) { - map.insert(Country::CL, cl::build(&years)?); - } - - #[cfg(feature = "CN")] - if countries.is_none() || countries.unwrap().contains(&Country::CN) { - map.insert(Country::CN, cn::build(&years)?); - } - - #[cfg(feature = "CO")] - if countries.is_none() || countries.unwrap().contains(&Country::CO) { - map.insert(Country::CO, co::build(&years)?); - } - - #[cfg(feature = "HR")] - if countries.is_none() || countries.unwrap().contains(&Country::HR) { - map.insert(Country::HR, hr::build(&years)?); - } - - #[cfg(feature = "CU")] - if countries.is_none() || countries.unwrap().contains(&Country::CU) { - map.insert(Country::CU, cu::build(&years)?); - } - - #[cfg(feature = "CW")] - if countries.is_none() || countries.unwrap().contains(&Country::CW) { - map.insert(Country::CW, cw::build(&years)?); - } - - #[cfg(feature = "CY")] - if countries.is_none() || countries.unwrap().contains(&Country::CY) { - map.insert(Country::CY, cy::build(&years)?); - } - - #[cfg(feature = "CZ")] - if countries.is_none() || countries.unwrap().contains(&Country::CZ) { - map.insert(Country::CZ, cz::build(&years)?); - } - - #[cfg(feature = "DK")] - if countries.is_none() || countries.unwrap().contains(&Country::DK) { - map.insert(Country::DK, dk::build(&years)?); - } - - #[cfg(feature = "DJ")] - if countries.is_none() || countries.unwrap().contains(&Country::DJ) { - map.insert(Country::DJ, dj::build(&years)?); - } - - #[cfg(feature = "DO")] - if countries.is_none() || countries.unwrap().contains(&Country::DO) { - map.insert(Country::DO, r#do::build(&years)?); - } - - #[cfg(feature = "EG")] - if countries.is_none() || countries.unwrap().contains(&Country::EG) { - map.insert(Country::EG, eg::build(&years)?); - } - - #[cfg(feature = "EE")] - if countries.is_none() || countries.unwrap().contains(&Country::EE) { - map.insert(Country::EE, ee::build(&years)?); - } - - #[cfg(feature = "ET")] - if countries.is_none() || countries.unwrap().contains(&Country::ET) { - map.insert(Country::ET, et::build(&years)?); - } - - #[cfg(feature = "FI")] - if countries.is_none() || countries.unwrap().contains(&Country::FI) { - map.insert(Country::FI, fi::build(&years)?); - } - - #[cfg(feature = "FR")] - if countries.is_none() || countries.unwrap().contains(&Country::FR) { - map.insert(Country::FR, fr::build(&years)?); - } - - #[cfg(feature = "GE")] - if countries.is_none() || countries.unwrap().contains(&Country::GE) { - map.insert(Country::GE, ge::build(&years)?); - } - - #[cfg(feature = "DE")] - if countries.is_none() || countries.unwrap().contains(&Country::DE) { - map.insert(Country::DE, de::build(&years)?); - } - - #[cfg(feature = "GR")] - if countries.is_none() || countries.unwrap().contains(&Country::GR) { - map.insert(Country::GR, gr::build(&years)?); - } - - #[cfg(feature = "HN")] - if countries.is_none() || countries.unwrap().contains(&Country::HN) { - map.insert(Country::HN, hn::build(&years)?); - } - - #[cfg(feature = "HK")] - if countries.is_none() || countries.unwrap().contains(&Country::HK) { - map.insert(Country::HK, hk::build(&years)?); - } - - #[cfg(feature = "HU")] - if countries.is_none() || countries.unwrap().contains(&Country::HU) { - map.insert(Country::HU, hu::build(&years)?); - } - - #[cfg(feature = "IS")] - if countries.is_none() || countries.unwrap().contains(&Country::IS) { - map.insert(Country::IS, is::build(&years)?); - } - - #[cfg(feature = "IN")] - if countries.is_none() || countries.unwrap().contains(&Country::IN) { - map.insert(Country::IN, r#in::build(&years)?); - } - - #[cfg(feature = "ID")] - if countries.is_none() || countries.unwrap().contains(&Country::ID) { - map.insert(Country::ID, id::build(&years)?); - } - - #[cfg(feature = "IE")] - if countries.is_none() || countries.unwrap().contains(&Country::IE) { - map.insert(Country::IE, ie::build(&years)?); - } - - #[cfg(feature = "IM")] - if countries.is_none() || countries.unwrap().contains(&Country::IM) { - map.insert(Country::IM, im::build(&years)?); - } - - #[cfg(feature = "IL")] - if countries.is_none() || countries.unwrap().contains(&Country::IL) { - map.insert(Country::IL, il::build(&years)?); - } - - #[cfg(feature = "IT")] - if countries.is_none() || countries.unwrap().contains(&Country::IT) { - map.insert(Country::IT, it::build(&years)?); - } - - #[cfg(feature = "JM")] - if countries.is_none() || countries.unwrap().contains(&Country::JM) { - map.insert(Country::JM, jm::build(&years)?); - } - - #[cfg(feature = "JP")] - if countries.is_none() || countries.unwrap().contains(&Country::JP) { - map.insert(Country::JP, jp::build(&years)?); - } - - #[cfg(feature = "KZ")] - if countries.is_none() || countries.unwrap().contains(&Country::KZ) { - map.insert(Country::KZ, kz::build(&years)?); - } - - #[cfg(feature = "KE")] - if countries.is_none() || countries.unwrap().contains(&Country::KE) { - map.insert(Country::KE, ke::build(&years)?); - } - - #[cfg(feature = "LV")] - if countries.is_none() || countries.unwrap().contains(&Country::LV) { - map.insert(Country::LV, lv::build(&years)?); - } - - #[cfg(feature = "LS")] - if countries.is_none() || countries.unwrap().contains(&Country::LS) { - map.insert(Country::LS, ls::build(&years)?); - } - - #[cfg(feature = "LI")] - if countries.is_none() || countries.unwrap().contains(&Country::LI) { - map.insert(Country::LI, li::build(&years)?); - } - - #[cfg(feature = "LT")] - if countries.is_none() || countries.unwrap().contains(&Country::LT) { - map.insert(Country::LT, lt::build(&years)?); - } - - #[cfg(feature = "LU")] - if countries.is_none() || countries.unwrap().contains(&Country::LU) { - map.insert(Country::LU, lu::build(&years)?); - } - - #[cfg(feature = "MG")] - if countries.is_none() || countries.unwrap().contains(&Country::MG) { - map.insert(Country::MG, mg::build(&years)?); - } - - #[cfg(feature = "MY")] - if countries.is_none() || countries.unwrap().contains(&Country::MY) { - map.insert(Country::MY, my::build(&years)?); - } - - #[cfg(feature = "MW")] - if countries.is_none() || countries.unwrap().contains(&Country::MW) { - map.insert(Country::MW, mw::build(&years)?); - } - - #[cfg(feature = "MT")] - if countries.is_none() || countries.unwrap().contains(&Country::MT) { - map.insert(Country::MT, mt::build(&years)?); - } - - #[cfg(feature = "MX")] - if countries.is_none() || countries.unwrap().contains(&Country::MX) { - map.insert(Country::MX, mx::build(&years)?); - } - - #[cfg(feature = "MD")] - if countries.is_none() || countries.unwrap().contains(&Country::MD) { - map.insert(Country::MD, md::build(&years)?); - } - - #[cfg(feature = "MA")] - if countries.is_none() || countries.unwrap().contains(&Country::MA) { - map.insert(Country::MA, ma::build(&years)?); - } - - #[cfg(feature = "MZ")] - if countries.is_none() || countries.unwrap().contains(&Country::MZ) { - map.insert(Country::MZ, mz::build(&years)?); - } - - #[cfg(feature = "NL")] - if countries.is_none() || countries.unwrap().contains(&Country::NL) { - map.insert(Country::NL, nl::build(&years)?); - } - - #[cfg(feature = "NA")] - if countries.is_none() || countries.unwrap().contains(&Country::NA) { - map.insert(Country::NA, na::build(&years)?); - } - - #[cfg(feature = "NZ")] - if countries.is_none() || countries.unwrap().contains(&Country::NZ) { - map.insert(Country::NZ, nz::build(&years)?); - } - - #[cfg(feature = "NI")] - if countries.is_none() || countries.unwrap().contains(&Country::NI) { - map.insert(Country::NI, ni::build(&years)?); - } - - #[cfg(feature = "NG")] - if countries.is_none() || countries.unwrap().contains(&Country::NG) { - map.insert(Country::NG, ng::build(&years)?); - } - - #[cfg(feature = "MK")] - if countries.is_none() || countries.unwrap().contains(&Country::MK) { - map.insert(Country::MK, mk::build(&years)?); - } - - #[cfg(feature = "NO")] - if countries.is_none() || countries.unwrap().contains(&Country::NO) { - map.insert(Country::NO, no::build(&years)?); - } - - #[cfg(feature = "PK")] - if countries.is_none() || countries.unwrap().contains(&Country::PK) { - map.insert(Country::PK, pk::build(&years)?); - } - - #[cfg(feature = "PY")] - if countries.is_none() || countries.unwrap().contains(&Country::PY) { - map.insert(Country::PY, py::build(&years)?); - } - - #[cfg(feature = "PE")] - if countries.is_none() || countries.unwrap().contains(&Country::PE) { - map.insert(Country::PE, pe::build(&years)?); - } - - #[cfg(feature = "PL")] - if countries.is_none() || countries.unwrap().contains(&Country::PL) { - map.insert(Country::PL, pl::build(&years)?); - } - - #[cfg(feature = "PT")] - if countries.is_none() || countries.unwrap().contains(&Country::PT) { - map.insert(Country::PT, pt::build(&years)?); - } - - #[cfg(feature = "RO")] - if countries.is_none() || countries.unwrap().contains(&Country::RO) { - map.insert(Country::RO, ro::build(&years)?); - } - - #[cfg(feature = "RU")] - if countries.is_none() || countries.unwrap().contains(&Country::RU) { - map.insert(Country::RU, ru::build(&years)?); - } - - #[cfg(feature = "SA")] - if countries.is_none() || countries.unwrap().contains(&Country::SA) { - map.insert(Country::SA, sa::build(&years)?); - } - - #[cfg(feature = "RS")] - if countries.is_none() || countries.unwrap().contains(&Country::RS) { - map.insert(Country::RS, rs::build(&years)?); - } - - #[cfg(feature = "SG")] - if countries.is_none() || countries.unwrap().contains(&Country::SG) { - map.insert(Country::SG, sg::build(&years)?); - } - - #[cfg(feature = "SK")] - if countries.is_none() || countries.unwrap().contains(&Country::SK) { - map.insert(Country::SK, sk::build(&years)?); - } - - #[cfg(feature = "SI")] - if countries.is_none() || countries.unwrap().contains(&Country::SI) { - map.insert(Country::SI, si::build(&years)?); - } - - #[cfg(feature = "ZA")] - if countries.is_none() || countries.unwrap().contains(&Country::ZA) { - map.insert(Country::ZA, za::build(&years)?); - } - - #[cfg(feature = "KR")] - if countries.is_none() || countries.unwrap().contains(&Country::KR) { - map.insert(Country::KR, kr::build(&years)?); - } - - #[cfg(feature = "ES")] - if countries.is_none() || countries.unwrap().contains(&Country::ES) { - map.insert(Country::ES, es::build(&years)?); - } - - #[cfg(feature = "SZ")] - if countries.is_none() || countries.unwrap().contains(&Country::SZ) { - map.insert(Country::SZ, sz::build(&years)?); - } - - #[cfg(feature = "SE")] - if countries.is_none() || countries.unwrap().contains(&Country::SE) { - map.insert(Country::SE, se::build(&years)?); - } - - #[cfg(feature = "CH")] - if countries.is_none() || countries.unwrap().contains(&Country::CH) { - map.insert(Country::CH, ch::build(&years)?); - } - - #[cfg(feature = "TW")] - if countries.is_none() || countries.unwrap().contains(&Country::TW) { - map.insert(Country::TW, tw::build(&years)?); - } - - #[cfg(feature = "TR")] - if countries.is_none() || countries.unwrap().contains(&Country::TR) { - map.insert(Country::TR, tr::build(&years)?); - } - - #[cfg(feature = "TN")] - if countries.is_none() || countries.unwrap().contains(&Country::TN) { - map.insert(Country::TN, tn::build(&years)?); - } - - #[cfg(feature = "UA")] - if countries.is_none() || countries.unwrap().contains(&Country::UA) { - map.insert(Country::UA, ua::build(&years)?); - } - - #[cfg(feature = "AE")] - if countries.is_none() || countries.unwrap().contains(&Country::AE) { - map.insert(Country::AE, ae::build(&years)?); - } - - #[cfg(feature = "GB")] - if countries.is_none() || countries.unwrap().contains(&Country::GB) { - map.insert(Country::GB, gb::build(&years)?); - } - - #[cfg(feature = "US")] - if countries.is_none() || countries.unwrap().contains(&Country::US) { - map.insert(Country::US, us::build(&years)?); - } - - #[cfg(feature = "UY")] - if countries.is_none() || countries.unwrap().contains(&Country::UY) { - map.insert(Country::UY, uy::build(&years)?); - } - - #[cfg(feature = "UZ")] - if countries.is_none() || countries.unwrap().contains(&Country::UZ) { - map.insert(Country::UZ, uz::build(&years)?); - } - - #[cfg(feature = "VE")] - if countries.is_none() || countries.unwrap().contains(&Country::VE) { - map.insert(Country::VE, ve::build(&years)?); - } - - #[cfg(feature = "VN")] - if countries.is_none() || countries.unwrap().contains(&Country::VN) { - map.insert(Country::VN, vn::build(&years)?); - } - - #[cfg(feature = "ZM")] - if countries.is_none() || countries.unwrap().contains(&Country::ZM) { - map.insert(Country::ZM, zm::build(&years)?); - } - - #[cfg(feature = "ZW")] - if countries.is_none() || countries.unwrap().contains(&Country::ZW) { - map.insert(Country::ZW, zw::build(&years)?); - } - - Ok(map) -} - -/// Angola. -#[cfg(feature = "AO")] -pub mod ao { -use super::*; - -/// Generate holiday map for Angola. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2000, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2000, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2000, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2000, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2000, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2000, 9, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2001, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2001, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2001, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2001, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2001, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2001, 2, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 11, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência (Observed)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2002, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2002, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2002, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2002, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2002, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2003, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2003, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2003, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2003, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2003, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2003, 11, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2004, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2004, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2004, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2004, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2004, 4, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2005, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2005, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2005, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2005, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2005, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2006, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2006, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2006, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2006, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2006, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 9, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2007, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2007, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2007, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2007, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2007, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2007, 2, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 11, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência (Observed)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2008, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2008, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2008, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2008, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2008, 11, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2009, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2009, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2009, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2009, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2009, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2010, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2010, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2010, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2010, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval, Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2011, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2011, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2011, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2011, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2012, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2012, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2012, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2012, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2012, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 11, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2013, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2013, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2013, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2014, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2014, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2014, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2014, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2014, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2014, 11, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2015, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2015, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2015, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2015, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2015, 3, 9)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2016, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2016, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2016, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2016, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2016, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2017, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2017, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2017, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2017, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2017, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 9, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo (Day off)")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2018, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2018, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2018, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2018, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2018, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2018, 3, 9)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher (Day off)")); - let date = NaiveDate::from_ymd_res(2018, 4, 30)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho (Day off)")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família (Day off)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2019, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2019, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2019, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2019, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2019, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2019, 4, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação (Day off)")); - let date = NaiveDate::from_ymd_res(2019, 9, 16)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Day off)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2020, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2020, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2020, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2020, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2020, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2020, 2, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada (Day off)")); - let date = NaiveDate::from_ymd_res(2020, 9, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Day off)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2021, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2021, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2021, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2021, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2021, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2021, 2, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada (Day off)")); - let date = NaiveDate::from_ymd_res(2021, 3, 22)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral (Day off)")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados (Day off)")); - let date = NaiveDate::from_ymd_res(2021, 11, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência (Day off)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2022, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2022, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2022, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2022, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2022, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2022, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2022, 3, 7)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher (Day off)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2023, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2023, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2023, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2023, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2023, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2023, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2023, 3, 24)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral (Day off)")); - let date = NaiveDate::from_ymd_res(2023, 4, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação (Day off)")); - let date = NaiveDate::from_ymd_res(2023, 11, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados (Day off)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2024, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2024, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2024, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2024, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2024, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2024, 4, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação (Day off)")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Day off)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2025, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2025, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2025, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2025, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2025, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2025, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2025, 2, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada (Day off)")); - let date = NaiveDate::from_ymd_res(2025, 5, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho (Day off)")); - let date = NaiveDate::from_ymd_res(2025, 11, 10)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência (Day off)")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família (Day off)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2026, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2026, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2026, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2026, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo (Day off)")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2026, 9, 18)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Day off)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2027, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2027, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2027, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2027, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2027, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2027, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2027, 2, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada (Day off)")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral (Day off)")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados (Day off)")); - let date = NaiveDate::from_ymd_res(2027, 11, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência (Day off)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2028, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2028, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2028, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2028, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2028, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2028, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2028, 3, 24)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral (Day off)")); - let date = NaiveDate::from_ymd_res(2028, 4, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação (Day off)")); - let date = NaiveDate::from_ymd_res(2028, 11, 3)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados (Day off)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo (Day off)")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2029, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2029, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2029, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2029, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2029, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2029, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2029, 3, 9)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher (Day off)")); - let date = NaiveDate::from_ymd_res(2029, 4, 30)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho (Day off)")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família (Day off)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Início da Luta Armada")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Internacional da Mulher")); - let date = NaiveDate::from_ymd_res(2030, 3, 23)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Libertação da África Austral")); - let date = NaiveDate::from_ymd_res(2030, 4, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2030, 9, 17)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional")); - let date = NaiveDate::from_ymd_res(2030, 11, 2)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia dos Finados")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Independência")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Carnaval (Day off)")); - let date = NaiveDate::from_ymd_res(2030, 4, 5)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia da Paz e Reconciliação (Day off)")); - let date = NaiveDate::from_ymd_res(2030, 9, 16)?; - m.insert(date, Holiday::new(Country::AO, "Angola", date, "Dia do Herói Nacional (Day off)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Argentina. -#[cfg(feature = "AR")] -pub mod ar { -use super::*; - -/// Generate holiday map for Argentina. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 6)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2000, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2000, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2000, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2001, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2001, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2001, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2001, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2001, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2002, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2002, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2002, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2002, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2003, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2003, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2004, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2004, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2004, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2004, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2004, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 7)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice], Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2005, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2005, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2005, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2005, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2005, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 2, 27)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2006, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2006, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2006, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2006, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2007, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2007, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2007, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2007, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2007, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2008, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2008, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2008, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2008, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 23)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2009, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2009, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2009, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Raza [Columbus day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2010, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War], Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2010, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2010, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2010, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2010, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2010, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2011, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2011, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2011, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2011, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2012, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2012, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2012, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2012, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2012, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2013, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2013, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2013, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2013, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2013, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2014, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2014, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2014, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2015, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War], Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2015, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2015, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2015, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice], Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2016, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2016, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2016, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2016, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2016, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2016, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2017, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2017, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2017, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2017, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2017, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2018, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2018, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2018, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2019, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2019, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2019, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2020, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2020, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2020, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2020, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2021, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War], Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2021, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2021, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2021, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2021, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2022, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2022, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2022, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2022, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2023, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2023, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2023, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2023, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2023, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2024, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2024, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2024, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2024, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2024, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2025, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2025, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2025, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2025, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2026, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War], Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2026, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2026, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2026, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2027, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2027, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2027, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2027, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2027, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2028, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2028, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2028, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2028, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2028, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2029, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2029, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2029, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2029, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2029, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 24)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Memoria por la Verdad y la Justicia [Memory's National Day for the Truth and Justice]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 2)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Veterano y de los Caidos en la Guerra de Malvinas [Veterans Day and the Fallen in the Malvinas War]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Revolucion de Mayo [May Revolution Day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. Manuel Belgrano [Day Pass to the Immortality of General D. Manuel Belgrano]")); - let date = NaiveDate::from_ymd_res(2030, 7, 9)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 8, 17)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Pase a la Inmortalidad del General D. José de San Martin [Day Pass to the Immortality of General D. José de San Martin]")); - let date = NaiveDate::from_ymd_res(2030, 10, 12)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - let date = NaiveDate::from_ymd_res(2030, 11, 20)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Día Nacional de la Soberanía [National Sovereignty Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::AR, "Argentina", date, "Navidad [Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Armenia. -#[cfg(feature = "AM")] -pub mod am { -use super::*; - -/// Generate holiday map for Armenia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մայրության և գեղեցկության տոն [Motherhood and Beauty Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մայրության և գեղեցկության տոն [Motherhood and Beauty Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատավորների համերաշխության միջազգային օր [International Day of Workers' Solidarity]")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2002, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2002, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2003, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2003, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2004, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2004, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2005, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2005, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2005, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2005, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2007, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2008, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2008, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2008, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2009, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2010, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2010, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2011, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2011, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2011, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2012, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2013, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2013, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2014, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2014, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2015, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2015, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2016, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2016, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2016, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2016, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2018, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2018, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2019, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2020, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2020, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 3)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "նախածննդյան տոներ [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Մեռելոց հիշատակի օր [The Day of Remembrance of the Dead]")); - let date = NaiveDate::from_ymd_res(2021, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2021, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2022, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2022, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2022, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2024, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2024, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2025, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2025, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2026, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2026, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2027, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2027, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2027, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2028, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2029, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սուրբ Ծնունդ եւ Հայտնություն [Christmas and Epiphany Day]")); - let date = NaiveDate::from_ymd_res(2030, 1, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Բանակի օր [Army Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Կանանց տոն [Women's Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 24)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Եղեռնի զոհերի հիշատակի օր [Armenian Genocide Remembrance Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Աշխատանքի օր [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հաղթանակի և Խաղաղության տոն [Victory and Peace Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 28)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Հանրապետության օր [Republic Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 5)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Սահմանադրության օր [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 21)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Անկախության օր [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::AM, "Armenia", date, "Ամանոր [New Year's Eve]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Aruba. -#[cfg(feature = "AW")] -pub mod aw { -use super::*; - -/// Generate holiday map for Aruba. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 6)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2000, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2001, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2002, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2003, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2004, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 7)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2006, 2, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2006, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2007, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2008, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day], Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 23)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2009, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2010, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2011, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2012, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2013, 4, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2014, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2015, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2016, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2017, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2019, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2020, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2021, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2022, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2023, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2025, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2026, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2027, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2028, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña Nobo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 1, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia Di Betico [Betico Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dialuna di Carnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2030, 3, 18)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Bierna Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Aña di Rey [King's Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Dia di Asuncion [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Pasco di Nacemento [Christmas]")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::AW, "Aruba", date, "Di Dos Dia di Pasco di Nacemento [Second Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Australia. -#[cfg(feature = "AU")] -pub mod au { -use super::*; - -/// Generate holiday map for Australia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day, Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 9, 22)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "National Day of Mourning for Queen Elizabeth II")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 28)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Australia Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 4, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::AU, "Australia", date, "Boxing Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Austria. -#[cfg(feature = "AT")] -pub mod at { -use super::*; - -/// Generate holiday map for Austria. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2000, 6, 22)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2000, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2001, 6, 14)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2001, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2002, 5, 30)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2002, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2003, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2004, 6, 10)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2004, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2005, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2006, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2007, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt, Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2008, 5, 22)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2008, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2009, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2010, 6, 3)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2010, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2011, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2013, 5, 30)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2013, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2014, 6, 19)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2014, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2015, 6, 4)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2015, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2016, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2017, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2018, 5, 31)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2018, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2019, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2020, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2021, 6, 3)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2021, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2022, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2023, 6, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2023, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2024, 5, 30)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2024, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2025, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2026, 6, 4)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2026, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2027, 5, 27)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2027, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2028, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2029, 5, 31)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2029, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Heilige Drei Könige")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2030, 10, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Mariä Empfängnis")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Christtag")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::AT, "Austria", date, "Stefanitag")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Azerbaijan. -#[cfg(feature = "AZ")] -pub mod az { -use super::*; - -/// Generate holiday map for Azerbaijan. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2000, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2002, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2003, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2004, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2005, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2006, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated), International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 5, 29)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated), New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2007, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2007, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2007, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2007, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2007, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated) (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 10, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated) (Observed)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2008, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 3, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 6, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2009, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2009, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2009, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2009, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2009, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 5, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated) (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 11, 30)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated) (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2010, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2010, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2010, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2010, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 5, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 6, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 9, 13)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated) (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2011, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2011, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2011, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2011, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 30)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 6, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2012, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2012, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2012, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2012, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2012, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2012, 10, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2012, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2013, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2013, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2013, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2013, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2013, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2013, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 6, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day (Observed)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2014, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2014, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2014, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2014, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2014, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2014, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2014, 3, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 6, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 11, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 10, 7)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2015, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2015, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2015, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2015, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2015, 3, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 5, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 7, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2016, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2016, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2016, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2016, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 30)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 6, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2017, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2017, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2017, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2017, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2017, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day, Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2017, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2017, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 5, 29)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 6, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2018, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2018, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2018, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2018, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day, Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2018, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2018, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2018, 8, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2018, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 6, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 6, 19)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami (Observed)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2019, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2019, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2019, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2019, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2019, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day (Observed)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2020, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2020, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2020, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2020, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2020, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2020, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2020, 3, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 5, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2021, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2021, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2021, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2021, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2021, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 5, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 6, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2022, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2022, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2022, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2022, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2022, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2022, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 30)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 6, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 12)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2023, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2023, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2023, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2023, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami")); - let date = NaiveDate::from_ymd_res(2023, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 4, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2024, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2024, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2024, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2024, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2024, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2024, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2024, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2024, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 6, 19)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated) (Observed)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2025, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2025, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2025, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2025, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2025, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 3, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 6, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 11, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 11, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated) (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated) (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz, Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz, Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2026, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2026, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated), Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz, Ramazan Bayrami* (*estimated) (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 5, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 11, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2027, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2027, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2027, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2027, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2027, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 10)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 6, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated) (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2028, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2028, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2028, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2028, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2028, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 29)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated) (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated) (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated) (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2029, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2029, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2029, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2029, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2029, 1, 3)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Black January")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 20)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2030, 3, 21)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2030, 3, 22)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2030, 3, 23)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2030, 3, 24)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day over Fascism")); - let date = NaiveDate::from_ymd_res(2030, 5, 28)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 27)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Azerbaijan Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2030, 11, 8)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2030, 11, 9)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "International Solidarity Day of Azerbaijanis")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Ramazan Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 3, 25)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 3, 26)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Novruz (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "National Salvation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Flag Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated) (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 4, 16)?; - m.insert(date, Holiday::new(Country::AZ, "Azerbaijan", date, "Gurban Bayrami* (*estimated) (Observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Bangladesh. -#[cfg(feature = "BD")] -pub mod bd { -use super::*; - -/// Generate holiday map for Bangladesh. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 2, 21)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "International Mother's language Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 17)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Sheikh Mujibur Rahman's Birthday and Children's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 26)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Bengali New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "May Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "National Mourning Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 16)?; - m.insert(date, Holiday::new(Country::BD, "Bangladesh", date, "Victory Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Belarus. -#[cfg(feature = "BY")] -pub mod by { -use super::*; - -/// Generate holiday map for Belarus. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы, Радуница")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2000, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2000, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2001, 4, 24)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2001, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2001, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2002, 5, 14)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2002, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2002, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2003, 5, 6)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2003, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2003, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2004, 4, 20)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2004, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2004, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2005, 5, 10)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2005, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2005, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2006, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2006, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2007, 4, 17)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2007, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2007, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2008, 5, 6)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2008, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2008, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2009, 4, 28)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2009, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2009, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2010, 4, 13)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2010, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2010, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2011, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2012, 4, 24)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2012, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2012, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2013, 5, 14)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2013, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2013, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2014, 4, 29)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2014, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2014, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2015, 4, 21)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2015, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2015, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2016, 5, 10)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2016, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2016, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2017, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2017, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2018, 4, 17)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2018, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2018, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2019, 5, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2019, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2019, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2020, 4, 28)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2020, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2020, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2021, 5, 11)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2021, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2021, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2022, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2022, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2023, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2023, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2024, 5, 14)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2024, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2024, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2025, 4, 29)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2025, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2025, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2026, 4, 21)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2026, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2026, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2027, 5, 11)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2027, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2027, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2028, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2028, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2029, 4, 17)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2029, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2029, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (православное Рождество)")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2030, 5, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Радуница")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Праздник труда")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2030, 7, 3)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Независимости Республики Беларусь (День Республики)")); - let date = NaiveDate::from_ymd_res(2030, 11, 7)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::BY, "Belarus", date, "Рождество Христово (католическое Рождество)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Belgium. -#[cfg(feature = "BE")] -pub mod be { -use super::*; - -/// Generate holiday map for Belgium. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2000, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2000, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2001, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2001, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2002, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2002, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2003, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2003, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2004, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2005, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2005, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2006, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2006, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2007, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2007, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid, O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2008, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2008, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2009, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2009, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2010, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2010, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2011, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2011, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2012, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2012, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2013, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2014, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2014, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2015, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2015, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2016, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2016, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2017, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2017, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2018, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2018, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2019, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2020, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2020, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2021, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2022, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2022, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2023, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2023, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2024, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2025, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2025, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2026, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2026, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2027, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2027, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2028, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2028, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2029, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2029, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pasen")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Paasmaandag")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.H. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinksteren")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Pinkstermaandag")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Dag van de Arbeid")); - let date = NaiveDate::from_ymd_res(2030, 7, 21)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Nationale feestdag")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "O.L.V. Hemelvaart")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Wapenstilstand")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::BE, "Belgium", date, "Kerstmis")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Bolivia. -#[cfg(feature = "BO")] -pub mod bo { -use super::*; - -/// Generate holiday map for Bolivia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2000, 3, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2000, 6, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2000, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2000, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2001, 6, 14)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2001, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2001, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2002, 5, 30)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2002, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2002, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2002, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2003, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2003, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2003, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2003, 11, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2004, 6, 10)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2004, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2004, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2005, 2, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2005, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2005, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2005, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2006, 2, 27)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2006, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2006, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2007, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2007, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2008, 5, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2008, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2008, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2008, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2008, 11, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2009, 2, 23)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2009, 6, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2009, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2009, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2010, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2010, 6, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2010, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2010, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2010, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2011, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2011, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2011, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2011, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2011, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2012, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2012, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2012, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2013, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2013, 5, 30)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2013, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2013, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2013, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2014, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2014, 6, 19)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2014, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2014, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2014, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2014, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2014, 11, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2015, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2015, 6, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2015, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2015, 6, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2015, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2015, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2016, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2016, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2016, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2016, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2016, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2017, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2017, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2017, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2018, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2018, 5, 31)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2018, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2018, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2018, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2019, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2019, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2019, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2019, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2019, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2020, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2020, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2020, 6, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2020, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2021, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2021, 6, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2021, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2021, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2021, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2022, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2022, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2022, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2022, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2022, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2023, 6, 8)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2023, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2023, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2023, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2024, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2024, 5, 30)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2024, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2024, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2024, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2024, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2025, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2025, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2025, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2025, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2025, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2025, 11, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2026, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2026, 6, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2026, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2026, 6, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2026, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2027, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2027, 5, 27)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2027, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2027, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2027, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2028, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2028, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2028, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2028, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2029, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2029, 5, 31)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2029, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2029, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2029, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo")); - let date = NaiveDate::from_ymd_res(2030, 1, 22)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Nacimiento del Estado Plurinacional de Bolivia")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Feriado por Carnaval (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia del trabajo")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2030, 6, 21)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Año Nuevo Andino")); - let date = NaiveDate::from_ymd_res(2030, 8, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Día de la Revolución Agraria")); - let date = NaiveDate::from_ymd_res(2030, 8, 6)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Dia de la Patria")); - let date = NaiveDate::from_ymd_res(2030, 11, 2)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Todos Santos")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::BO, "Bolivia", date, "Navidad")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Bosnia and Herzegovina. -#[cfg(feature = "BA")] -pub mod ba { -use super::*; - -/// Generate holiday map for Bosnia and Herzegovina. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2000, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2001, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2002, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2003, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Dana rada")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2007, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2008, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2009, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2010, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Dana rada")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2012, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2013, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2014, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2015, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - let date = NaiveDate::from_ymd_res(2016, 5, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Dana rada")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2017, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2018, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2019, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2020, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Dana rada")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Treći dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2023, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2024, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2025, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2026, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2028, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2029, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Nove Godine")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Dan rada")); - let date = NaiveDate::from_ymd_res(2030, 5, 2)?; - m.insert(date, Holiday::new(Country::BA, "Bosnia and Herzegovina", date, "Drugi dan Dana rada")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Botswana. -#[cfg(feature = "BW")] -pub mod bw { -use super::*; - -/// Generate holiday map for Botswana. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2000, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2001, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day (Observed), Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2002, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2003, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2004, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2005, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day (Observed), New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2006, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2007, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day (Observed), Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day, Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2008, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day (Observed), Labour Day (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day (Observed), New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2012, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day (Observed), Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2013, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2014, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day (Observed), New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2018, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day (Observed), Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 7, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2019, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2020, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day Holiday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2021, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day Holiday")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2022, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day (Observed), New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2023, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 3, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2024, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2025, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 21)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2026, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day Holiday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2027, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day Holiday")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 18)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2028, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 17)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2029, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day (Observed), Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 10, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday (Observed)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "New Year's Day Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Sir Seretse Khama Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 15)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 16)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "President's Day Holiday")); - let date = NaiveDate::from_ymd_res(2030, 9, 30)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 1)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Botswana Day Holiday")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::BW, "Botswana", date, "Boxing Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Brazil. -#[cfg(feature = "BR")] -pub mod br { -use super::*; - -/// Generate holiday map for Brazil. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa, Tiradentes")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2000, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2000, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2000, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2000, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2000, 6, 22)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2001, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2001, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2001, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2001, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2001, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2001, 6, 14)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2001, 2, 28)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2002, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2002, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2002, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2002, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2002, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2002, 5, 30)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2003, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2003, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2003, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2003, 3, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2004, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2004, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2004, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2004, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2004, 6, 10)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2004, 2, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2005, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2005, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2005, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2005, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2006, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2006, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2006, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2006, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2006, 3, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2007, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2007, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2007, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2007, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2007, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2007, 2, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2008, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2008, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2008, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2008, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2008, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2008, 5, 22)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2008, 2, 6)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2009, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2009, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2009, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2009, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2009, 2, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2010, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2010, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2010, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2010, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2010, 6, 3)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2010, 2, 17)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2011, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2011, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2011, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2011, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2011, 3, 9)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2012, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2012, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2012, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2012, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2012, 2, 22)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2013, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2013, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2013, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2013, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2013, 5, 30)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2013, 2, 13)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2014, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2014, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2014, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2014, 6, 19)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2014, 3, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2015, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2015, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2015, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2015, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2015, 6, 4)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2015, 2, 18)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2016, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2016, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2016, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2016, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2016, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2017, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2017, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2017, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2017, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2017, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2017, 3, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2018, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2018, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2018, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2018, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2018, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2018, 5, 31)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2018, 2, 14)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa, Tiradentes")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2019, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2019, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2019, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2019, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2019, 3, 6)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2020, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2020, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2020, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2020, 2, 26)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2021, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2021, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2021, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2021, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2021, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2021, 6, 3)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2021, 2, 17)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2022, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2022, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2022, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2022, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2022, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2022, 3, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2023, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2023, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2023, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2023, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2023, 6, 8)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2023, 2, 22)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2024, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2024, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2024, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2024, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2024, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2024, 5, 30)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2024, 2, 14)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2025, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2025, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2025, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2025, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2025, 3, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2026, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2026, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2026, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2026, 6, 4)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2027, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2027, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2027, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2027, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2027, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2027, 5, 27)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2027, 2, 10)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2028, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2028, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2028, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2028, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2028, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2028, 3, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2029, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Tiradentes")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2029, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2029, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2029, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2029, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2029, 5, 31)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Páscoa, Tiradentes")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2030, 9, 7)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Independência do Brasil")); - let date = NaiveDate::from_ymd_res(2030, 10, 12)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Nossa Senhora Aparecida")); - let date = NaiveDate::from_ymd_res(2030, 11, 2)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Finados")); - let date = NaiveDate::from_ymd_res(2030, 11, 15)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Proclamação da República")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Natal")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Corpus Christi")); - let date = NaiveDate::from_ymd_res(2030, 3, 6)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Quarta-feira de cinzas (Início da Quaresma)")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::BR, "Brazil", date, "Carnaval")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Bulgaria. -#[cfg(feature = "BG")] -pub mod bg { -use super::*; - -/// Generate holiday map for Bulgaria. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2000, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден, Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2000, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2000, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2000, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2000, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2000, 4, 28)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2000, 4, 29)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2001, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2001, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2001, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2001, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2002, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден, Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2002, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2002, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2002, 5, 4)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2003, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2003, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2003, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2003, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2003, 4, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2004, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2004, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2004, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2004, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2004, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2005, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден, Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2005, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2005, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2005, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2005, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2006, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2006, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2006, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2006, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2006, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2006, 4, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2007, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2007, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2007, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2007, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2007, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2008, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2008, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2008, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2008, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2008, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2008, 4, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2009, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2009, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2009, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2009, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2009, 4, 17)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2009, 4, 18)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2010, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2010, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2010, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2010, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2011, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2011, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2011, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2011, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2011, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2012, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2012, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2012, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2012, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2012, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2012, 4, 14)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2013, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден, Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2013, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2013, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2013, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2013, 5, 4)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2014, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2014, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2014, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2014, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2015, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2015, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2015, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2015, 4, 11)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2016, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден, Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2016, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2016, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2016, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2016, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2016, 4, 30)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2017, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2017, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2017, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2017, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2017, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2018, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2018, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2018, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2018, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2018, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2018, 4, 7)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2019, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2019, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2019, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2019, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2019, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2020, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2020, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2020, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2020, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2020, 4, 17)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2020, 4, 18)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2021, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота, Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2021, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2021, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2021, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2022, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2022, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2022, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2022, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2022, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2022, 4, 23)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2023, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2023, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2023, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2023, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2023, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2023, 4, 15)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2024, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден, Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2024, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2024, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2024, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2024, 5, 4)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2025, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2025, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2025, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2025, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2026, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2026, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2026, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2026, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2026, 4, 10)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2026, 4, 11)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2027, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота, Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2027, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2027, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2027, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2028, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2028, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2028, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2028, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2029, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2029, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2029, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2029, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2029, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2029, 4, 7)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2030, 3, 3)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Освобождението на България от османско иго")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на труда и на международната работническа солидарност")); - let date = NaiveDate::from_ymd_res(2030, 5, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Гергьовден, Ден на храбростта и Българската армия")); - let date = NaiveDate::from_ymd_res(2030, 5, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност")); - let date = NaiveDate::from_ymd_res(2030, 9, 6)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Съединението")); - let date = NaiveDate::from_ymd_res(2030, 9, 22)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на Независимостта на България")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Ден на народните будители")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Бъдни вечер")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Рождество Христово")); - let date = NaiveDate::from_ymd_res(2030, 4, 26)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велики петък")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Велика събота")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::BG, "Bulgaria", date, "Великден")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Burundi. -#[cfg(feature = "BI")] -pub mod bi { -use super::*; - -/// Generate holiday map for Burundi. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 7)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2006, 2, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha, New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 7)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day, Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2012, 2, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 7)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2017, 2, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2023, 2, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 7)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 22)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 6)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ntaryamira Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Eid Al Adha")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Assumption Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 13)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Prince Louis Rwagasore Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 10, 21)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "President Ndadaye's Day")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "All Saints' Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::BI, "Burundi", date, "Christmas Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Canada. -#[cfg(feature = "CA")] -pub mod ca { -use super::*; - -/// Generate holiday map for Canada. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 5, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2000, 9, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2001, 9, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 8)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2002, 9, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2003, 9, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 13)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 24)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2004, 9, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 23)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2005, 9, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2006, 9, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2007, 9, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 8)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2008, 9, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 13)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 2, 16)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 2, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 5, 23)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2012, 9, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 8)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2013, 9, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 17)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2014, 9, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 13)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 15)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 23)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 2, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2018, 9, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 8)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2019, 9, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 2, 17)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2020, 9, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2021, 9, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 2, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 23)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2022, 9, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2023, 9, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2024, 9, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 17)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2025, 9, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 13)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2026, 9, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 15)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 24)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2027, 9, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2028, 9, 4)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 9)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2029, 9, 3)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 8)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 18)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 20)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Victoria Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 1)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Canada Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 5)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Civic Holiday")); - let date = NaiveDate::from_ymd_res(2030, 9, 2)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::CA, "Canada", date, "Boxing Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Chile. -#[cfg(feature = "CL")] -pub mod cl { -use super::*; - -/// Generate holiday map for Chile. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2000, 6, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Corpus Christi [Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2000, 9, 4)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Unidad Nacional [Day of National Unity]")); - let date = NaiveDate::from_ymd_res(2000, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2000, 10, 9)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2001, 6, 11)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Corpus Christi [Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2001, 9, 3)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Unidad Nacional [Day of National Unity]")); - let date = NaiveDate::from_ymd_res(2001, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2001, 10, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2002, 5, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Corpus Christi [Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2002, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2002, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2003, 6, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Corpus Christi [Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2003, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2004, 6, 7)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Corpus Christi [Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2004, 6, 28)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2004, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2005, 5, 23)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Corpus Christi [Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2005, 6, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2005, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2006, 6, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Corpus Christi [Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2006, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2006, 10, 9)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2007, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2007, 9, 17)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2007, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2008, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2008, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2008, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2008, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2009, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2009, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2009, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2010, 6, 28)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2010, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2010, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2010, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2011, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2011, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2011, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2012, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2012, 9, 17)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2012, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2012, 10, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2012, 11, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2013, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2013, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2013, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2013, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2014, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2014, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2014, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2015, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2015, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2015, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2016, 6, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2016, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2016, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2016, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2017, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2017, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2017, 10, 9)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2017, 10, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2018, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2018, 9, 17)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2018, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2018, 10, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2018, 11, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2019, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2019, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2019, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Respeto a la Diversidad [Day of the Meeting of Two Worlds]")); - let date = NaiveDate::from_ymd_res(2019, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2020, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2020, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2020, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2021, 6, 28)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2021, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2021, 9, 17)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2021, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2021, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 9, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Feriado nacional [National Holiday]")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2022, 6, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2022, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2022, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2022, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2023, 6, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2023, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2023, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2023, 10, 9)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2023, 10, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2024, 3, 30)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2024, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2024, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2024, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2024, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2024, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2025, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2025, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2025, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2025, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2025, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2026, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2026, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2026, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2026, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2027, 3, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2027, 6, 28)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2027, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2027, 9, 17)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2027, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2027, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2028, 6, 26)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2028, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2028, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2028, 10, 9)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2028, 10, 27)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2029, 6, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2029, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2029, 9, 17)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2029, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2029, 10, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2029, 11, 2)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Viernes Santo) [Good Friday)]")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Semana Santa (Sábado Santo) [Good Saturday)]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias Navales [Navy Day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 21)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de los Pueblos Indígenas [National Day of Indigenous Peoples]")); - let date = NaiveDate::from_ymd_res(2030, 6, 29)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2030, 7, 16)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Virgen del Carmen [Our Lady of Mount Carmel]")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Asunción de la Virgen [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2030, 9, 18)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 19)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de las Glorias del Ejército [Army Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 20)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Fiestas Patrias [Holiday]")); - let date = NaiveDate::from_ymd_res(2030, 10, 12)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día del Descubrimiento de dos Mundos [Discovery of Two Worlds' Day]")); - let date = NaiveDate::from_ymd_res(2030, 10, 31)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día Nacional de las Iglesias Evangélicas y Protestantes [Reformation Day]")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Día de Todos los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CL, "Chile", date, "Navidad [Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// China. -#[cfg(feature = "CN")] -pub mod cn { -use super::*; - -/// Generate holiday map for China. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2000, 2, 7)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2000, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2001, 1, 26)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2002, 2, 14)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2002, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2003, 2, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2003, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2004, 1, 23)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2004, 1, 24)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2004, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2005, 2, 11)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2005, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2006, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2007, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2008, 2, 6)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 8)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2008, 9, 14)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2009, 1, 27)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2009, 1, 25)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2009, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival, National Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 28)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2010, 2, 13)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2010, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 16)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2010, 9, 22)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2011, 2, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2011, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2011, 9, 12)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2012, 1, 22)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2012, 9, 30)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2013, 2, 9)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2013, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 12)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2013, 9, 19)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2014, 2, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2014, 2, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2014, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2014, 9, 8)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2015, 2, 20)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2015, 2, 21)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2015, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 20)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2015, 9, 27)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2016, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 9)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2016, 9, 15)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2017, 1, 29)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2017, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 30)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2017, 10, 4)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2018, 2, 17)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2018, 2, 18)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2018, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 18)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2018, 9, 24)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2019, 2, 7)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2019, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 7)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2019, 9, 13)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival, National Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 25)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2021, 2, 13)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2021, 2, 14)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2021, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 14)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2021, 9, 21)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2022, 2, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2022, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2022, 9, 10)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2023, 1, 23)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2023, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 22)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2023, 9, 29)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2024, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 10)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2024, 9, 17)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2025, 1, 30)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2025, 1, 31)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 31)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2025, 10, 6)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2026, 2, 19)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2026, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 19)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2026, 9, 25)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2027, 2, 7)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2027, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 9)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2027, 9, 15)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2028, 1, 27)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2028, 1, 28)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2028, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival, National Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 28)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2029, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 16)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2029, 9, 22)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Chinese New Year (Spring Festival)")); - let date = NaiveDate::from_ymd_res(2030, 10, 1)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 2)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 3)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Tomb-Sweeping Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 5)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2030, 9, 12)?; - m.insert(date, Holiday::new(Country::CN, "China", date, "Mid-Autumn Festival")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Colombia. -#[cfg(feature = "CO")] -pub mod co { -use super::*; - -/// Generate holiday map for Colombia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 3, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 7, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed), San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 8, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 10, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 11, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 11, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 6, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 6, 26)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2001, 1, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 3, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 8, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 10, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 11, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 11, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 6, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 6, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 7, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 8, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 10, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 11, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 11, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 5, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 6, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 6, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany]")); - let date = NaiveDate::from_ymd_res(2003, 3, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 6, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed), San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 8, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 10, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 11, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 11, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 6, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 6, 23)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2004, 1, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 3, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 8, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 10, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day]")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 5, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 6, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 6, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2005, 1, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 7, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2005, 10, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 11, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 11, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 6, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 3, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 7, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 8, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 10, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 11, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 11, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 5, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 6, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 6, 26)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2007, 1, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 3, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 8, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 11, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 11, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 5, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 6, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 6, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 6, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 8, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 10, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 11, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 11, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 6, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2009, 1, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 3, 23)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 6, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2009, 8, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2009, 11, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 11, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 6, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 6, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2010, 1, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 8, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 10, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day]")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 5, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 6, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 6, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2011, 1, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 7, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed), San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2011, 10, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 11, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 6, 27)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2012, 1, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 3, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 10, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 11, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 11, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 5, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 6, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 6, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 7, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 8, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 6, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 6, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany]")); - let date = NaiveDate::from_ymd_res(2014, 3, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 6, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed), San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 8, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 10, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 11, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 11, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 6, 23)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2015, 1, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 3, 23)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 6, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2015, 8, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2015, 11, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 11, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 5, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 6, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 6, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2016, 1, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 7, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2016, 10, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 11, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 11, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 6, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2017, 1, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 3, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 7, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 8, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 10, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 11, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 11, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 6, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2018, 1, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 3, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 10, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 11, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 11, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 5, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 6, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 6, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 7, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed), San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 8, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 11, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 6, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 6, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany]")); - let date = NaiveDate::from_ymd_res(2020, 3, 23)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 6, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2020, 8, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 11, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 6, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 6, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2021, 1, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 8, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day]")); - let date = NaiveDate::from_ymd_res(2021, 11, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 6, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 6, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2022, 1, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2022, 10, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 11, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 11, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 6, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 6, 27)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2023, 1, 9)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 3, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 7, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 8, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 10, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 11, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 11, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 5, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 6, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 6, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2024, 1, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 7, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 8, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 10, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 11, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 6, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 6, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany]")); - let date = NaiveDate::from_ymd_res(2025, 3, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 6, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed), San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 8, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 10, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 11, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 11, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 6, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 6, 23)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2026, 1, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 23)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 6, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul]")); - let date = NaiveDate::from_ymd_res(2026, 8, 17)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 11, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 5, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 6, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 6, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2027, 1, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 8, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 10, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day]")); - let date = NaiveDate::from_ymd_res(2027, 11, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 31)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 6, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2028, 1, 10)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 3, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 7, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 8, 21)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 10, 16)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 11, 6)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 11, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 6, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 6, 26)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2029, 1, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 3, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 8, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 10, 15)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 11, 5)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 11, 12)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 6, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 6, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 20)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 8, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Batalla de Boyacá [Battle of Boyacá]")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de los Reyes Magos [Epiphany] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 3, 25)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de San José [Saint Joseph's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 7, 1)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Sagrado Corazón [Sacred Heart] (Observed), San Pedro y San Pablo [Saint Peter and Saint Paul] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 8, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "La Asunción [Assumption of Mary] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de la Raza [Columbus Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 11, 4)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Día de Todos los Santos [All Saint's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Independencia de Cartagena [Independence of Cartagena]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 6, 3)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Ascensión del señor [Ascension of Jesus] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 6, 24)?; - m.insert(date, Holiday::new(Country::CO, "Colombia", date, "Corpus Christi [Corpus Christi] (Observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Croatia. -#[cfg(feature = "HR")] -pub mod hr { -use super::*; - -/// Generate holiday map for Croatia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2000, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe, Tijelovo")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2000, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2000, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2000, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2001, 6, 14)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2001, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2001, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2001, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2001, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2002, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2002, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2002, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2002, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2002, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2003, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2003, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2003, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2003, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2004, 6, 10)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2004, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2004, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2004, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2004, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2005, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2005, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2005, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2005, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2006, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2006, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2006, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2006, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2007, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2007, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2007, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2007, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2008, 5, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2008, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2008, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2008, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2008, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2009, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2009, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2009, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2009, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2010, 6, 3)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2010, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2010, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2010, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2010, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2011, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2011, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2011, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2011, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2012, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2012, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2012, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2012, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2013, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2013, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2013, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2013, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2013, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2014, 6, 19)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2014, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2014, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2014, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2014, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2015, 6, 4)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2015, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2015, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2015, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2015, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2016, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2016, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2016, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2016, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2017, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2017, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2017, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2018, 5, 31)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2018, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2018, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2018, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2018, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2019, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2019, 6, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2019, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2019, 10, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan neovisnosti")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2020, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2020, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2020, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2020, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2021, 6, 3)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2021, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2021, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2021, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2021, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2022, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2022, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2022, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2022, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2023, 6, 8)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2023, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2023, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2023, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2023, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2024, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti, Tijelovo")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2024, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2024, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2024, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2025, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2025, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2025, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2025, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2026, 6, 4)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2026, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2026, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2026, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2026, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2027, 5, 27)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2027, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2027, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2027, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2027, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2028, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2028, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2028, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2028, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2029, 5, 31)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2029, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2029, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2029, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2029, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Nova Godina")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveta tri kralja")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrs")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Uskrsni ponedjeljak")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Tijelovo")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Međunarodni praznik rada")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan državnosti")); - let date = NaiveDate::from_ymd_res(2030, 6, 22)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan antifašističke borbe")); - let date = NaiveDate::from_ymd_res(2030, 8, 5)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan pobjede i domovinske zahvalnosti")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Velika Gospa")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Svi sveti")); - let date = NaiveDate::from_ymd_res(2030, 11, 18)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Dan sjećanja")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Božić")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::HR, "Croatia", date, "Sveti Stjepan")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Cuba. -#[cfg(feature = "CU")] -pub mod cu { -use super::*; - -/// Generate holiday map for Cuba. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2000, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2000, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2000, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2001, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2001, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2001, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2002, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2002, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2002, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2003, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2003, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2003, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2004, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2004, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2004, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2005, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2005, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2006, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2006, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2006, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2007, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2007, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2007, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2008, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2008, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2008, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2009, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2009, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2009, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2010, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2010, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2010, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2011, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2011, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution] (Observed), Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2012, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2012, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2012, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2013, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2013, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2013, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2014, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2014, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2014, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2015, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2015, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2015, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2016, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2016, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2017, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2017, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2017, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2018, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2018, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2018, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2019, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2019, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2019, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2020, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2020, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2020, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2021, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2021, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2021, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2022, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2022, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2023, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2023, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2023, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2024, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2024, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2024, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2025, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2025, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2025, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2026, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2026, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2026, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2027, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2027, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2027, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2028, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2028, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2028, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2029, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2029, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2029, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Aniversario de la Revolución [Anniversary of the Revolution]")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Victoria [Victory Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día Internacional de los Trabajadores [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2030, 7, 26)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de la Rebeldía Nacional [Day of the National Rebellion]")); - let date = NaiveDate::from_ymd_res(2030, 7, 27)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Conmemoración del asalto a Moncada [Commemoration of the Assault of the Moncada garrison]")); - let date = NaiveDate::from_ymd_res(2030, 10, 10)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Inicio de las Guerras de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::CU, "Cuba", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Curaçao. -#[cfg(feature = "CW")] -pub mod cw { -use super::*; - -/// Generate holiday map for Curaçao. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 6)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2000, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2001, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2002, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2002, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2003, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2004, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 7)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2005, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 2, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2006, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2007, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2008, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day], Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2008, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 23)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2009, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2010, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2011, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2012, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2013, 4, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Anja di La Reina [Queen's Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2013, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2014, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2015, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2016, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2016, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2017, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2018, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2019, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2020, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2021, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2022, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2023, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2024, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2025, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2026, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2027, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2027, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2028, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2029, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Nieuwjaarsdag [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Maandag na de Grote Karnaval [Carnaval Monday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Goede Vrijdag [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Di Dos Dia di Pasku di Resureccion [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Koningsdag [King's Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Obrero [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Hemelvaartsdag [Ascension Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 2)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Himno y Bandera [National Anthem & Flag Day]")); - let date = NaiveDate::from_ymd_res(2030, 10, 10)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Dia di Pais Kòrsou [Curaçao Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "Kerstdag [Christmas]")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::CW, "Curaçao", date, "2de Kerstdag [Second Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Cyprus. -#[cfg(feature = "CY")] -pub mod cy { -use super::*; - -/// Generate holiday map for Cyprus. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2000, 3, 13)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2000, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday], Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 19)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2000, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2001, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2002, 3, 18)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2002, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2003, 3, 10)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2003, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 16)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2003, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2004, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2004, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2005, 3, 14)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day], Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2005, 6, 20)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2005, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2006, 3, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2006, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 12)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2006, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2007, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2007, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2008, 3, 10)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 16)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2009, 3, 2)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2009, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 17)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 8)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2009, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2010, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2010, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2011, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2011, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2012, 2, 27)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2012, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2013, 3, 18)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2013, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2014, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2014, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2015, 2, 23)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2015, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2015, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2016, 3, 14)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day], Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2016, 6, 20)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2016, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2017, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2017, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2018, 2, 19)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2018, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2019, 3, 11)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2019, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2019, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2020, 3, 2)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2020, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 17)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 8)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2021, 3, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2021, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 21)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2021, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2022, 3, 7)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2022, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 13)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2022, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2023, 2, 27)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2023, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 5)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2023, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2024, 3, 18)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2024, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2025, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2026, 2, 23)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2026, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 10)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2026, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2027, 3, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 21)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2027, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2028, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2028, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2029, 2, 19)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2029, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2030, 3, 11)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2030, 3, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εικοστή Πέμπτη Μαρτίου [Greek Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "1η Απριλίου [Cyprus National Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Μεγάλη Παρασκευή [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κυριακή του Πάσχα [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2030, 10, 1)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα Ανεξαρτησίας της Κύπρου [Cyprus Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 10, 28)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Παραμονή Χριστουγέννων [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::CY, "Cyprus", date, "Δεύτερη μέρα Χριστουγέννων [Day after Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Czechia. -#[cfg(feature = "CZ")] -pub mod cz { -use super::*; - -/// Generate holiday map for Czechia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2000, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2000, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2000, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2000, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2000, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2000, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2001, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2001, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2001, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2001, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2001, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2001, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2002, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2002, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2002, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2002, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2002, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2002, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2003, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2003, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2003, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2003, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2003, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2003, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2004, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2004, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2004, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2004, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2004, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2005, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2005, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2005, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2005, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2005, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2005, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2006, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2006, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2006, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2006, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2006, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2006, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2007, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2007, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2007, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2007, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2007, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2007, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2008, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2008, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2008, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2008, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2008, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2008, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2009, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2009, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2009, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2009, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2009, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2009, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2010, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2010, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2010, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2010, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2011, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2011, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2011, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2011, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2011, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2011, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2012, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2012, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2012, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2012, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2012, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2013, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2013, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2013, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2013, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2013, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2013, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2014, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2014, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2014, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2014, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2014, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2014, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2015, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2015, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2015, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2015, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2015, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2015, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2016, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2016, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2016, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2016, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2016, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2017, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2017, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2017, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2017, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2017, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2017, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2018, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2018, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2018, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2018, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2018, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2018, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2019, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2019, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2019, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2019, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2019, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2019, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2020, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2020, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2020, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2020, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2020, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2020, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2021, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2021, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2021, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2021, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2021, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2022, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2022, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2022, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2022, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2022, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2022, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2023, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2023, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2023, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2023, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2023, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2023, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2024, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2024, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2024, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2024, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2024, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2024, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2025, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2025, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2025, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2025, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2025, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2025, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2026, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2026, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2026, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2026, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2026, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2026, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2027, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2027, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2027, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2027, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2027, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2028, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2028, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2028, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2028, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2028, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2029, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2029, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2029, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2029, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2029, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2029, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den obnovy samostatného českého státu")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velký pátek")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Velikonoční pondělí")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Svátek práce")); - let date = NaiveDate::from_ymd_res(2030, 5, 8)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vítězství")); - let date = NaiveDate::from_ymd_res(2030, 7, 5)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den slovanských věrozvěstů Cyrila a Metoděje")); - let date = NaiveDate::from_ymd_res(2030, 7, 6)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den upálení mistra Jana Husa")); - let date = NaiveDate::from_ymd_res(2030, 9, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den české státnosti")); - let date = NaiveDate::from_ymd_res(2030, 10, 28)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den vzniku samostatného československého státu")); - let date = NaiveDate::from_ymd_res(2030, 11, 17)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Den boje za svobodu a demokracii")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "Štědrý den")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "1. svátek vánoční")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::CZ, "Czechia", date, "2. svátek vánoční")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Denmark. -#[cfg(feature = "DK")] -pub mod dk { -use super::*; - -/// Generate holiday map for Denmark. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2000, 5, 19)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2001, 5, 11)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2002, 3, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2002, 4, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2003, 5, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2004, 5, 7)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2005, 4, 22)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2006, 5, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2007, 5, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2008, 4, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2009, 5, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2010, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2010, 4, 30)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2011, 5, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2012, 5, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2013, 3, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2013, 4, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2014, 5, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2015, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2016, 4, 22)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2017, 5, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2018, 3, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2018, 4, 27)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2019, 5, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2020, 5, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2021, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2022, 5, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2023, 5, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2024, 3, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2024, 4, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2025, 5, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2026, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2027, 4, 23)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2028, 5, 12)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2029, 3, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2029, 4, 27)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Nytårsdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Palmesøndag")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Skærtorsdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Påskedag")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden påskedag")); - let date = NaiveDate::from_ymd_res(2030, 5, 17)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Store bededag")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Pinsedag")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden pinsedag")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Juledag")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::DK, "Denmark", date, "Anden juledag")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Djibouti. -#[cfg(feature = "DJ")] -pub mod dj { -use super::*; - -/// Generate holiday map for Djibouti. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2000, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2000, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2000, 10, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2000, 3, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2001, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2001, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2001, 10, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2001, 3, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2002, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2002, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2002, 10, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2002, 2, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2003, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2003, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2003, 9, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2003, 2, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail, Naissance du prophet Muhammad")); - let date = NaiveDate::from_ymd_res(2004, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2004, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2004, 9, 12)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2004, 1, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2004, 2, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2005, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2005, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2005, 9, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2005, 1, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2006, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2006, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2006, 8, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2006, 12, 30)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2006, 4, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour, Nouvel an")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2007, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2007, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2007, 8, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2007, 12, 19)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2008, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2008, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2008, 7, 30)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2008, 12, 7)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2008, 1, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2009, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2009, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2009, 7, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2009, 11, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2010, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2010, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2010, 7, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2010, 12, 7)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2011, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2011, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2011, 6, 29)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2011, 11, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2011, 11, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2012, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2012, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2012, 10, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2012, 2, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2013, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2013, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2013, 6, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2014, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2014, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2014, 10, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2014, 1, 13)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2015, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2015, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2015, 5, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - let date = NaiveDate::from_ymd_res(2015, 12, 23)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2016, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2016, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2016, 5, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2016, 9, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2017, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2017, 4, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2017, 8, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2018, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2018, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2018, 4, 13)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2019, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2019, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2019, 4, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2019, 8, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2019, 8, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2020, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2020, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2020, 3, 22)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2020, 7, 30)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2021, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2021, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2021, 3, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2021, 7, 19)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2022, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2022, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2022, 7, 8)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2022, 7, 30)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2023, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat, Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha, Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2023, 2, 18)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2024, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2024, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2024, 2, 8)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2024, 6, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2025, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2025, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2025, 1, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2025, 6, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2026, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2026, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2026, 1, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2026, 5, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2027, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2027, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2027, 1, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2027, 5, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2028, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2028, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2028, 12, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2029, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2029, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2029, 12, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête du travail")); - let date = NaiveDate::from_ymd_res(2030, 6, 27)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2030, 6, 28)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2030, 11, 23)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Isra wal Miraj")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Fitr deuxième jour")); - let date = NaiveDate::from_ymd_res(2030, 4, 12)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Arafat")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Eid al-Adha deuxième jour")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Nouvel an musulman")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::DJ, "Djibouti", date, "Naissance du prophet Muhammad")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Dominican Republic. -#[cfg(feature = "DO")] -pub mod r#do { -use super::*; - -/// Generate holiday map for Dominican Republic. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2000, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2000, 1, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2000, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2000, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2000, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2001, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2001, 1, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2001, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2001, 8, 20)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2001, 11, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2002, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2002, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 4, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2002, 8, 19)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2002, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2002, 11, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2003, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2003, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2003, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2003, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2003, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2003, 11, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 1, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2004, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2004, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2004, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2004, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2004, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2004, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2004, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 1, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2005, 1, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2005, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2005, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2005, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2006, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2006, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2006, 8, 14)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2006, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2007, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2007, 1, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2007, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2007, 8, 20)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2007, 11, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2008, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2008, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2008, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2008, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2008, 11, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 1, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2009, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2009, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2009, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2009, 11, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2010, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2010, 1, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2010, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2010, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2010, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2010, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2010, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2011, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2011, 1, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2011, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2011, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2012, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2012, 1, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2012, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2012, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2012, 11, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2013, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2013, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 4, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2013, 8, 19)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2014, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2014, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2014, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2014, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2014, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2014, 11, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2015, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2015, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2015, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2015, 11, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2016, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2016, 1, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2016, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2016, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2016, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2017, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2017, 8, 14)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2017, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2017, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2018, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2018, 1, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2018, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2018, 11, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2019, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2019, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2019, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2019, 8, 19)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2019, 11, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2020, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2020, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2020, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2020, 11, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2021, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2021, 1, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2021, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2021, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2021, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2021, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 1, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2022, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2022, 1, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2022, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2022, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2022, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2023, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2023, 1, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2023, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2023, 8, 14)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2023, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2024, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2024, 1, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2024, 8, 19)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2024, 11, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2025, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2025, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2025, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2025, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2025, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2025, 11, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 1, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2026, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2026, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 5, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2026, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2026, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2026, 11, 9)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 1, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2027, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2027, 1, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2027, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2027, 8, 16)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2027, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2027, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 1, 10)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2028, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2028, 1, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2028, 8, 14)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2028, 11, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2029, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2029, 1, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 30)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2029, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2029, 8, 20)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2029, 11, 5)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de los Santos Reyes [Epiphany]")); - let date = NaiveDate::from_ymd_res(2030, 1, 21)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Altagracia [Lady of Altagracia]")); - let date = NaiveDate::from_ymd_res(2030, 1, 26)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Duarte [Juan Pablo Duarte Day]")); - let date = NaiveDate::from_ymd_res(2030, 2, 27)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 11)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Corpus Christi [Feast of Corpus Christi]")); - let date = NaiveDate::from_ymd_res(2030, 8, 19)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Restauración [Restoration Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 24)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de las Mercedes [Our Lady of Mercedes Day]")); - let date = NaiveDate::from_ymd_res(2030, 11, 4)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::DO, "Dominican Republic", date, "Día de Navidad [Christmas Day]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Egypt. -#[cfg(feature = "EG")] -pub mod eg { -use super::*; - -/// Generate holiday map for Egypt. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day, Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2000, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2001, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2002, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day, Prophet Muhammad's Birthday")); - let date = NaiveDate::from_ymd_res(2004, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 11, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 1, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday, Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2005, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2006, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 12, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2006, 4, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday, New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2007, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 19)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 1, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2009, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Police Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2009, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2010, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Police Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2010, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 12, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2011, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Police Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim, Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2012, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2012, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2012, 2, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2013, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2013, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2014, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2014, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day, Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2014, 1, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2015, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2015, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - let date = NaiveDate::from_ymd_res(2015, 12, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2016, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday, Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2016, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2017, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 8, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2018, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2018, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2019, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2020, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 7, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2021, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2021, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 19)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2022, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim, Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2023, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day, Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2024, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2025, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2025, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2026, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2026, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2027, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2028, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2029, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday, Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2029, 4, 26)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "New Year's Day - Bank Holiday")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Christmas")); - let date = NaiveDate::from_ymd_res(2030, 1, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day - January 25")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Coptic Easter Sunday")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sham El Nessim")); - let date = NaiveDate::from_ymd_res(2030, 4, 25)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Sinai Liberation Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Armed Forces Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 30)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "30 June Revolution Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 23)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Revolution Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 12)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::EG, "Egypt", date, "Prophet Muhammad's Birthday")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Estonia. -#[cfg(feature = "EE")] -pub mod ee { -use super::*; - -/// Generate holiday map for Estonia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2000, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2000, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2000, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2000, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2001, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2001, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2001, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2001, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2002, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2002, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2002, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2003, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2003, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2003, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2003, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2004, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2004, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2004, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2005, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2005, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2005, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2005, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2006, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2006, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2006, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2006, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2007, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2007, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2007, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2007, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2008, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2008, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2008, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2008, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2009, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2009, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2009, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2010, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2010, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2010, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2010, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2011, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2011, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2011, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2012, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2012, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2013, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2013, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2013, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2014, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2014, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2014, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2014, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2015, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2015, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2015, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2015, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2016, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2016, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2016, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2016, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2017, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2017, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2017, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2017, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2018, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2018, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2018, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2019, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2019, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2019, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2019, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2020, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2020, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2021, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2021, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2021, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2021, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2022, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2022, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2022, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2022, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2023, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2023, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2023, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2023, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2024, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2024, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2024, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2025, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2025, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2025, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2025, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2026, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2026, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2026, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2026, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2027, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2027, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2027, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2027, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2028, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2028, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2028, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2028, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2029, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2029, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2029, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2029, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "uusaasta")); - let date = NaiveDate::from_ymd_res(2030, 2, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "iseseisvuspäev")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "suur reede")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "ülestõusmispühade 1. püha")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "kevadpüha")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "nelipühade 1. püha")); - let date = NaiveDate::from_ymd_res(2030, 6, 23)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "võidupüha")); - let date = NaiveDate::from_ymd_res(2030, 6, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jaanipäev")); - let date = NaiveDate::from_ymd_res(2030, 8, 20)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "taasiseseisvumispäev")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "jõululaupäev")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "esimene jõulupüha")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::EE, "Estonia", date, "teine jõulupüha")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Ethiopia. -#[cfg(feature = "ET")] -pub mod et { -use super::*; - -/// Generate holiday map for Ethiopia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2000, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2000, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2000, 4, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2000, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2000, 6, 15)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2001, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2001, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2001, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2001, 6, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2002, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2002, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day, ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2002, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2002, 5, 25)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 9, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2003, 9, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2003, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2003, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2003, 5, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2004, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2004, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2004, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2005, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2005, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day, ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2005, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2005, 4, 22)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2006, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2006, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2006, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 4, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 9, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2007, 9, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2007, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2007, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2007, 4, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2008, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2008, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2008, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2009, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2009, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2009, 4, 17)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2009, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2009, 3, 10)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2010, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2010, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2010, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2010, 2, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 9, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2011, 9, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2011, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2011, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2011, 2, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2012, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2012, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2012, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2013, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2013, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day, ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2013, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2013, 1, 25)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2014, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2014, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2014, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2014, 1, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 9, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2015, 9, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2015, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2015, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2015, 1, 4)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha, አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2016, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2016, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day, ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2016, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 12, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2017, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2017, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2017, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2018, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2018, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2018, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2018, 11, 21)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 9, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2019, 9, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2019, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2019, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 11, 10)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2020, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2020, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2020, 4, 17)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2020, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 10, 30)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2021, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2021, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2021, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2021, 10, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2022, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2022, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2022, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2022, 10, 9)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 9, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2023, 9, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross, መውሊድ/Prophet Muhammad's Birthday")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2023, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2023, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2024, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2024, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day, ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2024, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2025, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2025, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2025, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2025, 9, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2026, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2026, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2026, 4, 10)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2026, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2026, 8, 26)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 9, 12)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2027, 9, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2027, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2027, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2028, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2028, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2028, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha, የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2028, 8, 4)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2029, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2029, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2029, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2029, 7, 25)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 9, 11)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አዲስ ዓመት እንቁጣጣሽ/Ethiopian New Year")); - let date = NaiveDate::from_ymd_res(2030, 9, 27)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መስቀል/Finding of True Cross")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ገና/Ethiopian X-Mas")); - let date = NaiveDate::from_ymd_res(2030, 1, 19)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ጥምቀት/Ephiphany")); - let date = NaiveDate::from_ymd_res(2030, 4, 26)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ስቅለት/Ethiopian Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ፋሲካ/Ethiopian Easter")); - let date = NaiveDate::from_ymd_res(2030, 3, 2)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አድዋ/Victory of Adwa")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የሰራተኞች ቀን/Labor Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 5)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "የአርበኞች ቀን/Patriots Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 28)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ደርግ የወደቀበት ቀን/Downfall of Dergue regime")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "ኢድ አልፈጥር/Eid-Al-Fitr")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "አረፋ/Eid-Al-Adha")); - let date = NaiveDate::from_ymd_res(2030, 7, 14)?; - m.insert(date, Holiday::new(Country::ET, "Ethiopia", date, "መውሊድ/Prophet Muhammad's Birthday")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Finland. -#[cfg(feature = "FI")] -pub mod fi { -use super::*; - -/// Generate holiday map for Finland. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2000, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2000, 11, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2000, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2000, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2001, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2001, 11, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2001, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2001, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2002, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2002, 11, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2002, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2003, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2003, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2003, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2004, 6, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2004, 11, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2004, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2004, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2005, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2005, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2005, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2006, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2006, 11, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2006, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2006, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2007, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2007, 11, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2007, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2007, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai, Vappu")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2008, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2008, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2008, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2009, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2009, 10, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2009, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2009, 6, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2010, 6, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2010, 11, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2010, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2010, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2011, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2011, 11, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2011, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2011, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2012, 11, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2012, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2012, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2013, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2013, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2013, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2014, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2014, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2014, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2015, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2015, 10, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2015, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2015, 6, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2016, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2016, 11, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2016, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2016, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2017, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2017, 11, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2017, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2017, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2018, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2018, 11, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2018, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2018, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2019, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2019, 11, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2019, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2019, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2020, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2020, 10, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2020, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2020, 6, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2021, 6, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2021, 11, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2021, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2021, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2022, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2022, 11, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2022, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2022, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2023, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2023, 11, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2023, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2023, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2024, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2024, 11, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2024, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2024, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2025, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2025, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2025, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2026, 6, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2026, 10, 31)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2026, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2026, 6, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2027, 6, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2027, 11, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2027, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2027, 6, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2028, 6, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2028, 11, 4)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2028, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2028, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2029, 6, 23)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2029, 11, 3)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2029, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2029, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Uudenvuodenpäivä")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Loppiainen")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pitkäperjantai")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "2. pääsiäispäivä")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Vappu")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helatorstai")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Helluntaipäivä")); - let date = NaiveDate::from_ymd_res(2030, 6, 22)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannuspäivä")); - let date = NaiveDate::from_ymd_res(2030, 11, 2)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Pyhäinpäivä")); - let date = NaiveDate::from_ymd_res(2030, 12, 6)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Itsenäisyyspäivä")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Joulupäivä")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Tapaninpäivä")); - let date = NaiveDate::from_ymd_res(2030, 6, 21)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Juhannusaatto")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::FI, "Finland", date, "Jouluaatto")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// France. -#[cfg(feature = "FR")] -pub mod fr { -use super::*; - -/// Generate holiday map for France. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2000, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2000, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2000, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2001, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2001, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2001, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2002, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2002, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2002, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2003, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2003, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2003, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2004, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2004, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2005, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2005, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2005, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2006, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2006, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2006, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2007, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2007, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2007, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension, Fête du Travail")); - let date = NaiveDate::from_ymd_res(2008, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2008, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2008, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2009, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2009, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2009, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2010, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2010, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2010, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2011, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2011, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2011, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2012, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2012, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2012, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2013, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2013, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2014, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2014, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2014, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2015, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2015, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2015, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2016, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2016, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2016, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2017, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2017, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2017, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2018, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2018, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2018, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2019, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2019, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2020, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2020, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2020, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2021, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2021, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2021, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2022, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2022, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2022, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2023, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2023, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2023, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2024, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2024, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2025, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2025, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2025, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2026, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2026, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2026, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2027, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2027, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2027, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2028, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2028, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2029, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2029, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2029, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Jour de l'an")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2030, 5, 8)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1945")); - let date = NaiveDate::from_ymd_res(2030, 7, 14)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Fête nationale")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Armistice 1918")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pâques")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Lundi de Pentecôte")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Ascension")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Assomption")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Toussaint")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::FR, "France", date, "Noël")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Georgia. -#[cfg(feature = "GE")] -pub mod ge { -use super::*; - -/// Generate holiday map for Georgia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2000, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2000, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2000, 4, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2000, 4, 29)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2000, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2000, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2000, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2000, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2000, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2000, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2001, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2001, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2001, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2001, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2001, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2001, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2001, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2001, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2002, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2002, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2002, 5, 4)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2002, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2002, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2002, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2002, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2002, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2002, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2003, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2003, 4, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2003, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2003, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2003, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2003, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2003, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2003, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2004, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2004, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე, წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2004, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2004, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2004, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2004, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2004, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2005, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2005, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2005, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2005, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2005, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2005, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2005, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2006, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2006, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2006, 4, 22)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2006, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2006, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2006, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2006, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2006, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2006, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2007, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2007, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე, შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2007, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2007, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2007, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2007, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2008, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2008, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2008, 4, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2008, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2008, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2008, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2008, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2009, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2009, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2009, 4, 17)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2009, 4, 18)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2009, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2009, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2009, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2009, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2009, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2010, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2010, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2010, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2010, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2010, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2010, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2010, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2010, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2011, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2011, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2011, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2011, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2011, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2011, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2011, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2011, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2012, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2012, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2012, 4, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2012, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2012, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2012, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2012, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2012, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2013, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2013, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2013, 5, 4)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2013, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2013, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2013, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2013, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2013, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2014, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2014, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2014, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2014, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2014, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2014, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2015, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2015, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2015, 4, 11)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2015, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2015, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2015, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2015, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2015, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2016, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2016, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2016, 4, 30)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2016, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2016, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2016, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2016, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2016, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2017, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2017, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2017, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2017, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2017, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2017, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2017, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2017, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2018, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2018, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2018, 4, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე, შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2018, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2018, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2018, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2018, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2018, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2019, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2019, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2019, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2019, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2019, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2019, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2019, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2020, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2020, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2020, 4, 17)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2020, 4, 18)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2020, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2020, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2020, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2020, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2021, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2021, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2021, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2021, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2021, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2021, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2021, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2021, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2022, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2022, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2022, 4, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2022, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2022, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2022, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2022, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2022, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2023, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2023, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2023, 4, 15)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2023, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2023, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2023, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2023, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2023, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2024, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2024, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2024, 5, 4)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2024, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2024, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2024, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2024, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2024, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2024, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2025, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2025, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2025, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2025, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2025, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2025, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2025, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2026, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2026, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2026, 4, 10)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2026, 4, 11)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2026, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2026, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2026, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2026, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2026, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2026, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2027, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2027, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2027, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2027, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2027, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2027, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2027, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2027, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2028, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2028, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2028, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2028, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2028, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2028, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2028, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2028, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2029, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2029, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2029, 4, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე, შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2029, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2029, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2029, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2029, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2029, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ახალი წელი")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ბედობა")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქრისტეშობა")); - let date = NaiveDate::from_ymd_res(2030, 1, 19)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ნათლისღება")); - let date = NaiveDate::from_ymd_res(2030, 3, 3)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დედის დღე")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ქალთა საერთაშორისო დღე")); - let date = NaiveDate::from_ymd_res(2030, 4, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წითელი პარასკევი")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დიდი შაბათი")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "აღდგომა")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "შავი ორშაბათი")); - let date = NaiveDate::from_ymd_res(2030, 4, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ეროვნული ერთიანობის დღე")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "ფაშიზმზე გამარჯვების დღე")); - let date = NaiveDate::from_ymd_res(2030, 5, 12)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "წმინდა ანდრია პირველწოდებულის დღე")); - let date = NaiveDate::from_ymd_res(2030, 5, 26)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "დამოუკიდებლობის დღე")); - let date = NaiveDate::from_ymd_res(2030, 8, 28)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "მარიამობა")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "სვეტიცხოვლობა")); - let date = NaiveDate::from_ymd_res(2030, 11, 23)?; - m.insert(date, Holiday::new(Country::GE, "Georgia", date, "გიორგობა")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Germany. -#[cfg(feature = "DE")] -pub mod de { -use super::*; - -/// Generate holiday map for Germany. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2000, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2001, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2002, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2003, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2004, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2005, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2006, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2007, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt, Erster Mai")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2009, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2010, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2011, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2012, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2013, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2015, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2016, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2017, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2017, 10, 31)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Reformationstag")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2018, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2019, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2020, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2021, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2022, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2023, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2024, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2025, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2026, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2027, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2028, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2029, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Mai")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Christi Himmelfahrt")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2030, 10, 3)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Tag der Deutschen Einheit")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Erster Weihnachtstag")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::DE, "Germany", date, "Zweiter Weihnachtstag")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Greece. -#[cfg(feature = "GR")] -pub mod gr { -use super::*; - -/// Generate holiday map for Greece. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2000, 3, 13)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2000, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday], Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 19)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2000, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2001, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2001, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2002, 3, 18)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2002, 6, 24)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2002, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2003, 3, 10)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2003, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2003, 6, 16)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2003, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2004, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2004, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2005, 3, 14)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2005, 6, 20)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2005, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2006, 3, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2006, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2006, 6, 12)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2006, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2007, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2007, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2008, 3, 10)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2008, 6, 16)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2008, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2009, 3, 2)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2009, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2009, 6, 8)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2009, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2010, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2010, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2011, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2011, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2012, 2, 27)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2012, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2013, 3, 18)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2013, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2014, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2014, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2015, 2, 23)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2015, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2015, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2016, 3, 14)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2016, 6, 20)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2016, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2017, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2017, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2018, 2, 19)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2018, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2019, 3, 11)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2019, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2019, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2020, 3, 2)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2020, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2020, 6, 8)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2020, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2021, 3, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2021, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2021, 6, 21)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 4)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2021, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2022, 3, 7)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2022, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2022, 6, 13)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2022, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2023, 2, 27)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2023, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2023, 6, 5)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2023, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2024, 3, 18)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2024, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2025, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2025, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2026, 2, 23)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2026, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2026, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2027, 3, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2027, 6, 21)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 4)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2027, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2028, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2028, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2029, 2, 19)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2029, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Πρωτοχρονιά [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Θεοφάνεια [Epiphany]")); - let date = NaiveDate::from_ymd_res(2030, 3, 11)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Καθαρά Δευτέρα [Clean Monday]")); - let date = NaiveDate::from_ymd_res(2030, 3, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εικοστή Πέμπτη Μαρτίου [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Πάσχα [Easter Monday]")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Δευτέρα του Αγίου Πνεύματος [Monday of the Holy Spirit]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Εργατική Πρωτομαγιά [Labour day]")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Κοίμηση της Θεοτόκου [Assumption of Mary]")); - let date = NaiveDate::from_ymd_res(2030, 10, 28)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Ημέρα του Όχι [Ochi Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Χριστούγεννα [Christmas]")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::GR, "Greece", date, "Επόμενη ημέρα των Χριστουγέννων [Day after Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Honduras. -#[cfg(feature = "HN")] -pub mod hn { -use super::*; - -/// Generate holiday map for Honduras. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2000, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2000, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day], Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2001, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2001, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2002, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2002, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2002, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2002, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2003, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2003, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2004, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2004, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2004, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2005, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2005, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2005, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2005, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day], Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2006, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2006, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2007, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2007, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2008, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2008, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2008, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2008, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2009, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2009, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2010, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2010, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2010, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2011, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2011, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2011, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2012, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2012, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2013, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2013, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2013, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2014, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de Morazán [Morazan's Day]")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2014, 10, 21)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Fuerzas Armadas [Army Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2015, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 10, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2015, 10, 8)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2015, 10, 9)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2016, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2016, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 10, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2016, 10, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2016, 10, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day], Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2017, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2017, 10, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2017, 10, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2018, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2018, 10, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 10, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2019, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2019, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2020, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 10, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2020, 10, 8)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2020, 10, 9)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2021, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 10, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2021, 10, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2021, 10, 8)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day], Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2022, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 10, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2022, 10, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2022, 10, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2023, 10, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2023, 10, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 30)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 10, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2024, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2024, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2025, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2025, 10, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2025, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2026, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 10, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2026, 10, 8)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2026, 10, 9)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 27)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2027, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2027, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 10, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2027, 10, 7)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2027, 10, 8)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day], Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2028, 10, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2028, 10, 6)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2029, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2029, 10, 5)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de las Américas [Panamerican Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día del Trabajo [Labor Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 15)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 10, 2)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2030, 10, 3)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2030, 10, 4)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Semana Morazánica [Morazan Weekend]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::HN, "Honduras", date, "Navidad [Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Hong Kong. -#[cfg(feature = "HK")] -pub mod hk { -use super::*; - -/// Generate holiday map for Hong Kong. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2000, 2, 8)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2000, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 5, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2000, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2000, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following National Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2001, 1, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2001, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 4, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2002, 2, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2002, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2002, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2002, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2003, 2, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2003, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 8)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2003, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2003, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2004, 1, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2004, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2004, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2004, 9, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2004, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2005, 2, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2005, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2005, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2005, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second weekday after Christmas Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the first day of January")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day preceding Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2006, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2006, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2006, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following National Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day preceding Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2007, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2008, 2, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2008, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2008, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2008, 9, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2009, 1, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2009, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2009, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2009, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day preceding Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2010, 4, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2010, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2010, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2011, 2, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2011, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 5, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2011, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2011, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second weekday after Christmas Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the first day of January")); - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2012, 1, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2012, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 4, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2012, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following National Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2013, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2013, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 20)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2013, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2014, 2, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2014, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2014, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2014, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 9, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The 70th anniversary day of the victory of the Chinese people's war of resistance against Japanese aggression")); - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 20)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2015, 2, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 20)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2015, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2015, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2016, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2016, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2016, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second weekday after Christmas Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the first day of January")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2017, 1, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2017, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2017, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2017, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following National Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2018, 2, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2018, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2018, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2019, 2, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2019, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2019, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2019, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2020, 1, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2020, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 4, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2020, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2021, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2021, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2022, 2, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2022, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2022, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of the Chinese Mid-Autumn Festival (Monday)")); - let date = NaiveDate::from_ymd_res(2022, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second weekday after Christmas Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the first day of January")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2023, 1, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2023, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2023, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2023, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following National Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 23)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2024, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 3, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 10)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2024, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2024, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 11)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2025, 1, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2025, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2025, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2026, 2, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 7)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2026, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2026, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2027, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2027, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2027, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 8)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 27)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2028, 1, 28)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2028, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 29)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2028, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2028, 10, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following National Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2029, 4, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 24)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of the Chinese Mid-Autumn Festival (Monday)")); - let date = NaiveDate::from_ymd_res(2029, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 16)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first day of January")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The fourth day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The second day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The third day of Lunar New Year")); - let date = NaiveDate::from_ymd_res(2030, 4, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Ching Ming Festival")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Tuen Ng Festival")); - let date = NaiveDate::from_ymd_res(2030, 7, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Hong Kong Special Administrative Region Establishment Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 13)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The day following the Chinese Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2030, 10, 1)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 5)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Chung Yeung Festival")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::HK, "Hong Kong", date, "The first weekday after Christmas Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Hungary. -#[cfg(feature = "HU")] -pub mod hu { -use super::*; - -/// Generate holiday map for Hungary. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2000, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2000, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2000, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2001, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2001, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2001, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2002, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2002, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2003, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2003, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2003, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2004, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2004, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2004, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2005, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2005, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2005, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2006, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2006, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2007, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2007, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2007, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2008, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2008, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2008, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2009, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2009, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2009, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2010, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2010, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2010, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2011, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2011, 3, 14)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2011, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2011, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2011, 10, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2012, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2012, 3, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2012, 4, 30)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2012, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2012, 10, 22)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2012, 11, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2013, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2013, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2013, 8, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2013, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - let date = NaiveDate::from_ymd_res(2013, 12, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja utáni pihenőnap")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2014, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2014, 5, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2014, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2014, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2014, 10, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2015, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2015, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2015, 8, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2015, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2016, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2016, 3, 14)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2016, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2016, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2016, 10, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2017, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2017, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2017, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2018, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2018, 3, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2018, 4, 30)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2018, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2018, 10, 22)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2018, 11, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szilveszter")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2019, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2019, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2019, 8, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2019, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - let date = NaiveDate::from_ymd_res(2019, 12, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja utáni pihenőnap")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2020, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2020, 8, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2020, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2021, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2021, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2021, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2022, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2022, 3, 14)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2022, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2022, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2022, 10, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2023, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2023, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2023, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2024, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2024, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2024, 8, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2024, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - let date = NaiveDate::from_ymd_res(2024, 12, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja utáni pihenőnap")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2025, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2025, 5, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2025, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2025, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2025, 10, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2026, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2026, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2026, 8, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2026, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2027, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2027, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2027, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2028, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2028, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2028, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2029, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2029, 3, 16)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2029, 4, 30)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2029, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2029, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2029, 10, 22)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2029, 11, 2)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek utáni pihenőnap")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szilveszter")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Újév")); - let date = NaiveDate::from_ymd_res(2030, 3, 15)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nagypéntek")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Húsvét Hétfő")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösd")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Pünkösdhétfő")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "A Munka ünnepe")); - let date = NaiveDate::from_ymd_res(2030, 8, 20)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe")); - let date = NaiveDate::from_ymd_res(2030, 8, 19)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Az államalapítás ünnepe előtti pihenőnap")); - let date = NaiveDate::from_ymd_res(2030, 10, 23)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Nemzeti ünnep")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Mindenszentek")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Szenteste")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja")); - let date = NaiveDate::from_ymd_res(2030, 12, 27)?; - m.insert(date, Holiday::new(Country::HU, "Hungary", date, "Karácsony másnapja utáni pihenőnap")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Iceland. -#[cfg(feature = "IS")] -pub mod is { -use super::*; - -/// Generate holiday map for Iceland. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur, Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2000, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2001, 4, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2001, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2002, 4, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2002, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2002, 8, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2003, 4, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2003, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2003, 8, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2004, 4, 22)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2004, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2005, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2006, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2006, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2007, 4, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2007, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2008, 4, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur, Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2008, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2008, 8, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2009, 4, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2009, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2009, 8, 3)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2010, 4, 22)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2010, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur, Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2011, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2012, 4, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2013, 4, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2013, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2013, 8, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2014, 4, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2014, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2014, 8, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2015, 4, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2015, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2015, 8, 3)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2016, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2016, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2017, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2017, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2018, 4, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2019, 8, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2020, 4, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2020, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2021, 4, 22)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2021, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2022, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2022, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2023, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2023, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2024, 8, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2025, 4, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2025, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2025, 8, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2026, 4, 23)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2026, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2026, 8, 3)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2027, 4, 22)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2027, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2028, 4, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2028, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2029, 4, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2029, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Nýársdagur")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Skírdagur")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Föstudagurinn langi")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Páskadagur")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í páskum")); - let date = NaiveDate::from_ymd_res(2030, 4, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Sumardagurinn fyrsti")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Verkalýðsdagurinn")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Uppstigningardagur")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Hvítasunnudagur")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í hvítasunnu")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Þjóðhátíðardagurinn")); - let date = NaiveDate::from_ymd_res(2030, 8, 5)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Frídagur verslunarmanna")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Aðfangadagur")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Jóladagur")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Annar í jólum")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::IS, "Iceland", date, "Gamlársdagur")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// India. -#[cfg(feature = "IN")] -pub mod r#in { -use super::*; - -/// Generate holiday map for India. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2000, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2001, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2001, 11, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2001, 3, 10)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2002, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2002, 11, 4)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2003, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2003, 10, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2003, 3, 18)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2004, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2004, 11, 12)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2004, 3, 7)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2005, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2006, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2006, 10, 21)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2006, 3, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2007, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2007, 11, 9)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2007, 3, 4)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2008, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2008, 10, 28)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2009, 10, 17)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2009, 3, 11)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2010, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2010, 11, 5)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2010, 3, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2011, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2011, 10, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2011, 3, 20)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2012, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2012, 11, 13)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2013, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2013, 11, 3)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2013, 3, 27)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2014, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2014, 10, 23)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2014, 3, 17)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2015, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2015, 11, 11)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2015, 3, 6)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2016, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2016, 10, 30)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2017, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2017, 10, 19)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2017, 3, 13)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2018, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2018, 11, 7)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2018, 3, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2019, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2019, 10, 27)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2020, 11, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2020, 3, 10)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2021, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2021, 11, 4)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2021, 3, 29)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2022, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2022, 10, 24)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2022, 3, 18)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2023, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2023, 11, 12)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2024, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2024, 3, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2025, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2025, 10, 20)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2025, 3, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2026, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2026, 11, 8)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2026, 3, 4)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2027, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2027, 10, 29)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2028, 10, 17)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2028, 3, 11)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2029, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2029, 11, 5)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2029, 3, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 14)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Makar Sankranti / Pongal")); - let date = NaiveDate::from_ymd_res(2030, 1, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 2)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Gandhi Jayanti")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Christmas")); - let date = NaiveDate::from_ymd_res(2030, 10, 26)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Diwali")); - let date = NaiveDate::from_ymd_res(2030, 3, 20)?; - m.insert(date, Holiday::new(Country::IN, "India", date, "Holi")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Indonesia. -#[cfg(feature = "ID")] -pub mod id { -use super::*; - -/// Generate holiday map for Indonesia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 10, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2000, 5, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2000, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 10, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2001, 5, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2001, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 10, 4)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2002, 5, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2002, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2003, 3, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 9, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2003, 5, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2003, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 9, 12)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2004, 6, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2004, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 9, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2005, 5, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2005, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2006, 4, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2006, 8, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2006, 5, 12)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2006, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2007, 8, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2007, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2007, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2008, 1, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2008, 12, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2008, 7, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2008, 5, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2008, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2009, 3, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2009, 7, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2009, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2010, 3, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2010, 12, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2010, 7, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2010, 5, 28)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2010, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2011, 3, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2011, 6, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2011, 5, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2011, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2012, 3, 23)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2012, 5, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2012, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2013, 3, 12)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2013, 11, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2013, 6, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2013, 5, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2013, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2014, 3, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2014, 1, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2014, 5, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2014, 5, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2014, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2015, 5, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2015, 6, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2015, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2016, 3, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2016, 12, 12)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2016, 5, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2016, 5, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2016, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2017, 3, 28)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2017, 4, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2017, 5, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2017, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2017, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 6, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Pemilihan")); - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2018, 3, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2018, 4, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2018, 5, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2018, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2018, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 4, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Pemilihan")); - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2019, 3, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2019, 9, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2019, 4, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2019, 5, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2019, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2019, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 12, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Pemilihan")); - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2020, 3, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2020, 3, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2020, 5, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2020, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2021, 3, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri, Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2021, 8, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2021, 10, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2021, 3, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2021, 5, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2021, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2021, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2022, 3, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 30)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2022, 5, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2022, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2022, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2023, 3, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 2, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2023, 6, 4)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2023, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2023, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2024, 3, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 2, 8)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2024, 5, 22)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2024, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2024, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2025, 3, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 1, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2025, 5, 11)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2025, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2025, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2026, 3, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Suci Nyepi")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 1, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2026, 5, 31)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2026, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 1, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal, Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2027, 5, 20)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2027, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2027, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus, Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 12, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2028, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2028, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 12, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2029, 5, 27)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2029, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2029, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Masehi")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Imlek")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari kedua dari Hari Raya Idul Fitri* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Idul Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Tahun Baru Islam* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Maulid Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 11, 23)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Isra' Mi'raj Nabi Muhammad* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Wafat Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2030, 5, 16)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Waisak* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Buruh Internasional")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Kenaikan Yesus Kristus")); - let date = NaiveDate::from_ymd_res(2030, 6, 1)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Lahir Pancasila")); - let date = NaiveDate::from_ymd_res(2030, 8, 17)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Kemerdekaan Republik Indonesia")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::ID, "Indonesia", date, "Hari Raya Natal")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Ireland. -#[cfg(feature = "IE")] -pub mod ie { -use super::*; - -/// Generate holiday map for Ireland. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2000, 10, 30)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 19)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2001, 10, 29)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 18)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2002, 8, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2002, 10, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2003, 8, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2003, 10, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2004, 10, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2005, 10, 31)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed), St. Stephen's Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 30)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 19)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 29)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2008, 8, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2009, 8, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2009, 10, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2010, 10, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2011, 10, 31)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed), St. Stephen's Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 19)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 29)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 18)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2014, 8, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2015, 8, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2015, 10, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2016, 10, 31)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed), St. Stephen's Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2017, 10, 30)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 19)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2018, 10, 29)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 18)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2019, 10, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2020, 10, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2021, 10, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 3, 18)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Day of Remembrance and Recognition")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2022, 10, 31)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed), St. Stephen's Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day")); - let date = NaiveDate::from_ymd_res(2023, 2, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2023, 10, 30)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 18)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2024, 8, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2024, 10, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2025, 8, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2025, 10, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2026, 8, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2026, 10, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day, St. Brigid's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2027, 10, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2028, 10, 30)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 19)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 7)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 4)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2029, 10, 29)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 1)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Brigid's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 17)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 18)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Patrick's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 6)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "May Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 3)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "June Bank Holiday")); - let date = NaiveDate::from_ymd_res(2030, 8, 5)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "August Bank Holiday")); - let date = NaiveDate::from_ymd_res(2030, 10, 28)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "October Bank Holiday")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::IE, "Ireland", date, "St. Stephen's Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Isle of Man. -#[cfg(feature = "IM")] -pub mod im { -use super::*; - -/// Generate holiday map for Isle of Man. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2000, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2000, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2000, 8, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2000, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2001, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 3, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2001, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 5, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2001, 8, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2001, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 6, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Golden Jubilee of Elizabeth II")); - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2002, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 3, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 8, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2002, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2002, 8, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2002, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2003, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 8, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2003, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2003, 8, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2003, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2004, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2004, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2004, 8, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 6, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2005, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2005, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2005, 8, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2005, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2006, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2006, 8, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2006, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2007, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 3, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2007, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 5, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2007, 8, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2007, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2008, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 8, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2008, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2008, 8, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2008, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2009, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 8, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2009, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2009, 8, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 6, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2009, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2010, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2010, 8, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 6, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 4, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Wedding of William and Catherine")); - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2011, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2011, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2011, 8, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2011, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 6, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Diamond Jubilee of Elizabeth II")); - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 3, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2012, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 5, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2012, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2013, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 3, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 8, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2013, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2013, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2014, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 8, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2014, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2014, 8, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2015, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 8, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2015, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2015, 8, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 6, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2016, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2016, 8, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2017, 8, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2017, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2018, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 3, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2018, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 5, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2018, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2019, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 3, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 8, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2019, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 5, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2019, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2020, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2020, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 5, 8)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 6, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2020, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2021, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2021, 8, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 6, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 6, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Platinum Jubilee of Elizabeth II, TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2022, 9, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "State Funeral of Queen Elizabeth II")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2022, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2022, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2022, 8, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 5, 8)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Coronation of Charles III")); - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2023, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2023, 8, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2023, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2024, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 3, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 8, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2024, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2024, 8, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2024, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2025, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 8, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2025, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2025, 8, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2025, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2026, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 8, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2026, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 5, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2026, 8, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 6, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2026, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2027, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2027, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 31)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2027, 8, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 6, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2028, 1, 4)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2028, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 29)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2028, 8, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2028, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2029, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 3, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2029, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 5, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2029, 8, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2029, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2030, 3, 17)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 3, 18)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 7, 12)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 8, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2030, 11, 30)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 5, 6)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "May Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 27)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2030, 8, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 7)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "TT Bank Holiday")); - let date = NaiveDate::from_ymd_res(2030, 7, 5)?; - m.insert(date, Holiday::new(Country::IM, "Isle of Man", date, "Tynwald Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Israel. -#[cfg(feature = "IL")] -pub mod il { -use super::*; - -/// Generate holiday map for Israel. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2000, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2000, 6, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2000, 6, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2000, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2000, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2000, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2000, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2000, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2000, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2000, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2000, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2000, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2000, 10, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2000, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 12, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2000, 3, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2000, 3, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2000, 3, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 4, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2001, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2001, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2001, 4, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 5, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2001, 5, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2001, 9, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2001, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2001, 9, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2001, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2001, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2001, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2001, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2001, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2001, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2001, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2001, 3, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2001, 3, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 3, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 4, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2002, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2002, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2002, 5, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2002, 5, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2002, 9, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2002, 9, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2002, 9, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2002, 9, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2002, 9, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2002, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2002, 9, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2002, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2002, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2002, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2002, 11, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 12, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 12, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 12, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 12, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2002, 2, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2002, 2, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2002, 2, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2003, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2003, 5, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2003, 6, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2003, 6, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2003, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2003, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2003, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2003, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2003, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2003, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2003, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2003, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2003, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2003, 12, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 12, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2003, 3, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2003, 3, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2003, 3, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2004, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2004, 4, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 4, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2004, 5, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2004, 5, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2004, 9, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2004, 9, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2004, 9, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2004, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2004, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2004, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2004, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2004, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2004, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2004, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2004, 3, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2004, 3, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2005, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2005, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 4, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2005, 5, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2005, 6, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2005, 6, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2005, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2005, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2005, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2005, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2005, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2005, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2005, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2005, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 10, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 10, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 10, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2005, 10, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2005, 10, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2005, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2005, 12, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2005, 12, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2006, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2006, 6, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2006, 6, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2006, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2006, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2006, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2006, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2006, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2006, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2006, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2006, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2006, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2006, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2006, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 12, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 12, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 12, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 12, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2006, 3, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2006, 3, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2006, 3, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 4, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2007, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2007, 4, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2007, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 5, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2007, 5, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2007, 5, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2007, 9, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2007, 9, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2007, 9, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2007, 9, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2007, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2007, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2007, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2007, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2007, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2007, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2007, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 12, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 12, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2007, 3, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2007, 3, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2007, 3, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2008, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2008, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2008, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 5, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 5, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2008, 6, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2008, 6, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2008, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2008, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2008, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2008, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2008, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2008, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2008, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2008, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2008, 10, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2008, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 12, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2009, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2009, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2009, 5, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2009, 5, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2009, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2009, 9, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2009, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2009, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2009, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2009, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2009, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2009, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2009, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2009, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 12, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2009, 3, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2009, 3, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 3, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2010, 3, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2010, 3, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2010, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 5, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2010, 5, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2010, 5, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2010, 9, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2010, 9, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2010, 9, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2010, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2010, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2010, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2010, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2010, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2010, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2010, 12, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 12, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 12, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 12, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 12, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2010, 2, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2010, 2, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2010, 3, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2011, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2011, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2011, 5, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2011, 6, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2011, 6, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2011, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2011, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2011, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2011, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2011, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2011, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2011, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2011, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2011, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2011, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2011, 12, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2011, 3, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2011, 3, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2012, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed), Memorial Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 4, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2012, 5, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2012, 9, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2012, 9, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2012, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2012, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2012, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2012, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2012, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2012, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2012, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2012, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2012, 3, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2012, 3, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 3, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2013, 3, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2013, 3, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2013, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2013, 5, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2013, 5, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2013, 9, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2013, 9, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2013, 9, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2013, 9, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2013, 9, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2013, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2013, 9, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2013, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 9, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2013, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2013, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2013, 11, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 11, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 11, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 12, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 12, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 12, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 12, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2013, 2, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2013, 2, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2013, 2, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2014, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2014, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2014, 5, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 5, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 5, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2014, 6, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2014, 6, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2014, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2014, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2014, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2014, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2014, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2014, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2014, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2014, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2014, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 12, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 12, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 12, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 12, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2014, 3, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2014, 3, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2014, 3, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 4, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2015, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed), Memorial Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2015, 5, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2015, 9, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2015, 9, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2015, 9, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2015, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2015, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2015, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2015, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2015, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2015, 12, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2015, 3, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2015, 3, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2015, 3, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2016, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2016, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 4, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2016, 5, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed), Memorial Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2016, 6, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2016, 6, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2016, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2016, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2016, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2016, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2016, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2016, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2016, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 10, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 10, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2016, 10, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2016, 10, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2016, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2016, 12, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2016, 12, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2016, 3, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2017, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2017, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2017, 4, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 5, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 5, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2017, 5, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2017, 5, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2017, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2017, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2017, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2017, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2017, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2017, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2017, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2017, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2017, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2017, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 12, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 12, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 12, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2017, 3, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2017, 3, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2017, 3, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 4, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2018, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed), Memorial Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2018, 5, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2018, 9, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2018, 9, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2018, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2018, 9, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2018, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2018, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2018, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2018, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2018, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2018, 12, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 12, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 12, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 12, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2018, 2, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2018, 3, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2018, 3, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed), Memorial Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 5, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2019, 6, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2019, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2019, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2019, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2019, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2019, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2019, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2019, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2019, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2019, 10, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2019, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 12, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 12, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2019, 3, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2019, 3, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2020, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2020, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2020, 5, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2020, 5, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2020, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2020, 9, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2020, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2020, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2020, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2020, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2020, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2020, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2020, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2020, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2020, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 12, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2020, 3, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2020, 3, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2020, 3, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 3, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2021, 3, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2021, 3, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 3, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 3, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2021, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2021, 5, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2021, 5, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2021, 9, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2021, 9, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2021, 9, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2021, 9, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2021, 9, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2021, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2021, 9, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2021, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2021, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2021, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2021, 11, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 11, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 12, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 12, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 12, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 12, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 12, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2021, 2, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2021, 2, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2021, 2, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2022, 5, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed), Memorial Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2022, 6, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2022, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2022, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2022, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2022, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2022, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2022, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2022, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2022, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2022, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2022, 12, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 12, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 12, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2022, 3, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2022, 3, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2022, 3, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2023, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2023, 5, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2023, 5, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2023, 9, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2023, 9, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2023, 9, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2023, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2023, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2023, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2023, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2023, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2023, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2023, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2023, 3, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2023, 3, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2024, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2024, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 4, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2024, 4, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2024, 5, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 5, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 5, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2024, 6, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2024, 6, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2024, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2024, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2024, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2024, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2024, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2024, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2024, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2024, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 10, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 10, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2024, 10, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2024, 10, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2024, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2024, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2024, 12, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2024, 12, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2024, 3, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2024, 3, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2024, 3, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2025, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2025, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2025, 5, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 5, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 5, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2025, 6, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2025, 6, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2025, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2025, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2025, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2025, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2025, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2025, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2025, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2025, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2025, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2025, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 12, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 12, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 12, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 12, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2025, 3, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2025, 3, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2025, 3, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 4, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 4, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2026, 4, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2026, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2026, 5, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2026, 5, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2026, 9, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2026, 9, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2026, 9, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2026, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2026, 9, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2026, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2026, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2026, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2026, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2026, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2026, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 12, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 12, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 12, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 12, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 12, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2026, 3, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2026, 3, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2026, 3, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2027, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2027, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 4, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 4, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2027, 4, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2027, 5, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2027, 6, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2027, 6, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2027, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2027, 10, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2027, 10, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2027, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2027, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2027, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2027, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 10, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 10, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2027, 10, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2027, 10, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2027, 12, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2027, 12, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2027, 3, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2027, 3, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 4, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2028, 4, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2028, 4, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2028, 4, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day, Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2028, 5, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2028, 5, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2028, 9, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2028, 9, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2028, 9, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2028, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2028, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2028, 10, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2028, 10, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2028, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 10, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 10, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 10, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2028, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2028, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2028, 12, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 12, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 12, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 12, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 12, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 12, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 12, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 12, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2028, 3, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2028, 3, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2028, 3, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 4, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 4, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 4, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2029, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day (Observed), Memorial Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2029, 5, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2029, 9, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2029, 9, 10)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2029, 9, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2029, 9, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2029, 9, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2029, 9, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2029, 9, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2029, 9, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 9, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2029, 9, 30)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2029, 10, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2029, 12, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 12, 3)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 12, 4)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 12, 5)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 12, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 12, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 12, 9)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2029, 2, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2029, 3, 1)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2029, 3, 2)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 4, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I - Eve")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover I")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 4, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII - Eve")); - let date = NaiveDate::from_ymd_res(2030, 4, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Passover VII")); - let date = NaiveDate::from_ymd_res(2030, 5, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 8)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Lag B'Omer")); - let date = NaiveDate::from_ymd_res(2030, 6, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot - Eve")); - let date = NaiveDate::from_ymd_res(2030, 6, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shavuot")); - let date = NaiveDate::from_ymd_res(2030, 9, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah - Eve")); - let date = NaiveDate::from_ymd_res(2030, 9, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2030, 9, 29)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Rosh Hashanah")); - let date = NaiveDate::from_ymd_res(2030, 10, 6)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur - Eve")); - let date = NaiveDate::from_ymd_res(2030, 10, 7)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Yom Kippur")); - let date = NaiveDate::from_ymd_res(2030, 10, 11)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I - Eve")); - let date = NaiveDate::from_ymd_res(2030, 10, 12)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot I")); - let date = NaiveDate::from_ymd_res(2030, 10, 13)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 10, 15)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 10, 16)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 10, 17)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot - Chol HaMoed")); - let date = NaiveDate::from_ymd_res(2030, 10, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII - Eve")); - let date = NaiveDate::from_ymd_res(2030, 10, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Sukkot VII")); - let date = NaiveDate::from_ymd_res(2030, 12, 21)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 12, 22)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 12, 23)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 12, 27)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 12, 28)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Hanukkah")); - let date = NaiveDate::from_ymd_res(2030, 3, 18)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim - Eve")); - let date = NaiveDate::from_ymd_res(2030, 3, 19)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Purim")); - let date = NaiveDate::from_ymd_res(2030, 3, 20)?; - m.insert(date, Holiday::new(Country::IL, "Israel", date, "Shushan Purim")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Italy. -#[cfg(feature = "IT")] -pub mod it { -use super::*; - -/// Generate holiday map for Italy. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2000, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2000, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2001, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2001, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2002, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2002, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2003, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2004, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2005, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2005, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2006, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2006, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2007, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2007, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2008, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2009, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2009, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2010, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2010, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione, Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2012, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2012, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2013, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2013, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2014, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2015, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2015, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2016, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2016, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2017, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2018, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2018, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2019, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2020, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2020, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2021, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2021, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2022, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2023, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2024, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2025, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2025, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2026, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2026, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2027, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2028, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2029, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Capodanno")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Epifania del Signore")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Pasqua di Resurrezione")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Lunedì dell'Angelo")); - let date = NaiveDate::from_ymd_res(2030, 4, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Liberazione")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa dei Lavoratori")); - let date = NaiveDate::from_ymd_res(2030, 6, 2)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Festa della Repubblica")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Assunzione della Vergine")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Tutti i Santi")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Immacolata Concezione")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Natale")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::IT, "Italy", date, "Santo Stefano")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Jamaica. -#[cfg(feature = "JM")] -pub mod jm { -use super::*; - -/// Generate holiday map for Jamaica. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2001, 2, 28)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 11)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2003, 3, 5)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 24)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 6, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2004, 2, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2006, 3, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2007, 2, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2008, 2, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2009, 2, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 6, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2010, 2, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2011, 3, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2012, 2, 22)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2013, 2, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 11)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2014, 3, 5)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2015, 2, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2017, 3, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday, Valentine's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2019, 3, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2020, 2, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 6, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2021, 2, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 8)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2022, 3, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2023, 2, 22)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday, Valentine's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 11)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2025, 3, 5)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 24)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 6, 20)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2027, 2, 10)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 18)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2028, 3, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday, Valentine's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 13)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 17)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 15)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 14)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Valentine's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 12)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 23)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 16)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Father's Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 1)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Emancipation Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "National Heroes Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2030, 3, 6)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Ash Wednesday")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::JM, "Jamaica", date, "Easter Monday")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Japan. -#[cfg(feature = "JP")] -pub mod jp { -use super::*; - -/// Generate holiday map for Japan. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2000, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2000, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2000, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2000, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2000, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2000, 7, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2000, 9, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2000, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2000, 10, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2000, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2000, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2000, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2000, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2001, 1, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2001, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2001, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2001, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2001, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2001, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2001, 7, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2001, 9, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2001, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2001, 10, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2001, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2001, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2001, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2001, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2001, 2, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2001, 4, 30)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2001, 9, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2002, 1, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2002, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2002, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2002, 7, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2002, 9, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2002, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2002, 10, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2002, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2002, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2002, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2002, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2002, 9, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2002, 11, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2003, 1, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2003, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2003, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2003, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2003, 7, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2003, 9, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2003, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2003, 10, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2003, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2003, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2003, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2003, 11, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2004, 1, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2004, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2004, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2004, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2004, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2004, 7, 19)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2004, 9, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2004, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2004, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2004, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2004, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2004, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2005, 1, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2005, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2005, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2005, 7, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2005, 9, 19)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2005, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2005, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2005, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2005, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2005, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2006, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2006, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2006, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2006, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2006, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2006, 7, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2006, 9, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2006, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2006, 10, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2006, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2006, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2006, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2006, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2007, 1, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2007, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2007, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2007, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2007, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2007, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2007, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2007, 7, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2007, 9, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2007, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2007, 10, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2007, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2007, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2007, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2007, 2, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2007, 4, 30)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2007, 9, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2008, 1, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2008, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2008, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2008, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2008, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2008, 7, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2008, 9, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2008, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2008, 10, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2008, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2008, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2008, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2008, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2008, 11, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2009, 1, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2009, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2009, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2009, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2009, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2009, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2009, 7, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2009, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2009, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2009, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2009, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2009, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2010, 1, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2010, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2010, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2010, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2010, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2010, 7, 19)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2010, 9, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2010, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2010, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2010, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2010, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2010, 3, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2011, 1, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2011, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2011, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2011, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2011, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2011, 7, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2011, 9, 19)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2011, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2011, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2011, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2011, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2012, 1, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2012, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2012, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2012, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2012, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2012, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2012, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2012, 7, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2012, 9, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2012, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2012, 10, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2012, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2012, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2012, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2012, 4, 30)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2013, 1, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2013, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2013, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2013, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2013, 7, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2013, 9, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2013, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2013, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2013, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2013, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2014, 1, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2014, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2014, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2014, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2014, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2014, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2014, 7, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2014, 9, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2014, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2014, 10, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2014, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2014, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2014, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2014, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2014, 11, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2015, 1, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2015, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2015, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2015, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2015, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2015, 7, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2015, 9, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2015, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2015, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2015, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2015, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2016, 1, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2016, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2016, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2016, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2016, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2016, 7, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2016, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2016, 9, 19)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2016, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2016, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2016, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2016, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2017, 1, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2017, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2017, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2017, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2017, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2017, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2017, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2017, 7, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2017, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2017, 9, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2017, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2017, 10, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2017, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2017, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2017, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2018, 1, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2018, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2018, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2018, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2018, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2018, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2018, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2018, 7, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2018, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2018, 9, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2018, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2018, 10, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2018, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2018, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2018, 12, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2018, 4, 30)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2018, 9, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇の即位の日")); - let date = NaiveDate::from_ymd_res(2019, 10, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "即位礼正殿の儀が行われる日")); - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2019, 1, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2019, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2019, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2019, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2019, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2019, 7, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2019, 9, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2019, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "体育の日")); - let date = NaiveDate::from_ymd_res(2019, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2019, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2019, 4, 30)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2019, 5, 2)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2019, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2019, 11, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2020, 1, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2020, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2020, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2020, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2020, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2020, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2020, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2020, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2020, 7, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2020, 8, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2020, 9, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2020, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2020, 7, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2020, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2020, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2020, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2021, 1, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2021, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2021, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2021, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2021, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2021, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2021, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2021, 8, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2021, 9, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2021, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2021, 7, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2021, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2021, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2022, 1, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2022, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2022, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2022, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2022, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2022, 7, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2022, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2022, 9, 19)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2022, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2022, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2022, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2023, 1, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2023, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2023, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2023, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2023, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2023, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2023, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2023, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2023, 7, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2023, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2023, 9, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2023, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2023, 10, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2023, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2023, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2024, 1, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2024, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2024, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2024, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2024, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2024, 7, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2024, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2024, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2024, 10, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2024, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2024, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2024, 8, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2024, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2024, 11, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2025, 1, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2025, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2025, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2025, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2025, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2025, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2025, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2025, 7, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2025, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2025, 9, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2025, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2025, 10, 13)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2025, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2025, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2025, 2, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2025, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2025, 11, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2026, 1, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2026, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2026, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2026, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2026, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2026, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2026, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2026, 7, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2026, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2026, 9, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2026, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2026, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2026, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2026, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "国民の休日")); - let date = NaiveDate::from_ymd_res(2026, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2027, 1, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2027, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2027, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2027, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2027, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2027, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2027, 7, 19)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2027, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2027, 9, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2027, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2027, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2027, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2028, 1, 10)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2028, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2028, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2028, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2028, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2028, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2028, 7, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2028, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2028, 9, 18)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2028, 9, 22)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2028, 10, 9)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2028, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2028, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2029, 1, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2029, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2029, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2029, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2029, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2029, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2029, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2029, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2029, 7, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2029, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2029, 9, 17)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2029, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2029, 10, 8)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2029, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2029, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2029, 4, 30)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2029, 9, 24)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "元日")); - let date = NaiveDate::from_ymd_res(2030, 1, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "成人の日")); - let date = NaiveDate::from_ymd_res(2030, 2, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "建国記念の日")); - let date = NaiveDate::from_ymd_res(2030, 2, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "天皇誕生日")); - let date = NaiveDate::from_ymd_res(2030, 3, 20)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "春分の日")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "昭和の日")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "憲法記念日")); - let date = NaiveDate::from_ymd_res(2030, 5, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "みどりの日")); - let date = NaiveDate::from_ymd_res(2030, 5, 5)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "こどもの日")); - let date = NaiveDate::from_ymd_res(2030, 7, 15)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "海の日")); - let date = NaiveDate::from_ymd_res(2030, 8, 11)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "山の日")); - let date = NaiveDate::from_ymd_res(2030, 9, 16)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "敬老の日")); - let date = NaiveDate::from_ymd_res(2030, 9, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "秋分の日")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "スポーツの日")); - let date = NaiveDate::from_ymd_res(2030, 11, 3)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "文化の日")); - let date = NaiveDate::from_ymd_res(2030, 11, 23)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "勤労感謝の日")); - let date = NaiveDate::from_ymd_res(2030, 5, 6)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2030, 8, 12)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - let date = NaiveDate::from_ymd_res(2030, 11, 4)?; - m.insert(date, Holiday::new(Country::JP, "Japan", date, "振替休日")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Kazakhstan. -#[cfg(feature = "KZ")] -pub mod kz { -use super::*; - -/// Generate holiday map for Kazakhstan. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2000, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2001, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2002, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2003, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 9, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 10, 27)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2004, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 5, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2005, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 12, 19)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 12, 18)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 12, 19)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2007, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 18)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2008, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 9, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 10, 27)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2009, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 5, 11)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 8, 31)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2010, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2010, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2010, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 5, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2011, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2011, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2011, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 12, 19)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2012, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2012, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2012, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 12, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 12, 18)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2013, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2013, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2013, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2013, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 7, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 12, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2014, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2014, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2014, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2014, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 7, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 9, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2015, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2015, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2015, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2015, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 5, 11)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 8, 31)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2016, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2016, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2016, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2016, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 19)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2017, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2017, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2017, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 5, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 12, 18)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 12, 19)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2018, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2018, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2018, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2018, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 12, 18)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2019, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2019, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2019, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2019, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 7, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 12, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2020, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2020, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2020, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 5, 11)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 8, 31)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2021, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2021, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2021, 12, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "First President Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 5, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2022, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2022, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2022, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2023, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2023, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2023, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2023, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 5, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 12, 18)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2024, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2024, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2024, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2024, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 7, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2025, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2025, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2025, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2025, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 7, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 9, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 10, 27)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2026, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 5, 11)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 8, 31)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 10, 26)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2027, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 10)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2028, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2028, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2028, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 4)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 12, 18)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2029, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2029, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2029, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2029, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 17)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 21)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2030, 3, 22)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2030, 3, 23)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan People Solidarity Holiday")); - let date = NaiveDate::from_ymd_res(2030, 5, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Defender of the Fatherland Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 6)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 30)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Constitution Day of the Republic of Kazakhstan")); - let date = NaiveDate::from_ymd_res(2030, 10, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 16)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kazakhstan Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 25)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Nauryz holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 7, 8)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Capital Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Orthodox Christmas")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::KZ, "Kazakhstan", date, "Kurban Ait")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Kenya. -#[cfg(feature = "KE")] -pub mod ke { -use super::*; - -/// Generate holiday map for Kenya. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 13)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day (Observed), Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 13)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day (Observed), Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day (Observed), Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 13)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day (Observed), Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 13)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 1)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Madaraka Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 10)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Huduma Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 20)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 12)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Jamhuri (Independence) Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Utamaduni Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 21)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Mashujaa Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::KE, "Kenya", date, "Easter Monday")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Latvia. -#[cfg(feature = "LV")] -pub mod lv { -use super::*; - -/// Generate holiday map for Latvia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2000, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2000, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2000, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2000, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2001, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2001, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2001, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2001, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2002, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2002, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2002, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2002, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2003, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2003, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2003, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2003, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2004, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2004, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2004, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2004, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2005, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2005, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2005, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2005, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2006, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2006, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2006, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2006, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2007, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2007, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2007, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2007, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2008, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2008, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2008, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2008, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2009, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2009, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2009, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2010, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2010, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2010, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2011, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2011, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2011, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2012, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2012, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2012, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2013, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2013, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2013, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2014, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2014, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2014, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2014, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2015, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2015, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2015, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2016, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2016, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2016, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2016, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2017, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2017, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2017, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2017, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2018, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2018, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2018, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2018, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2019, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2019, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2019, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2019, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2020, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2020, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2020, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2020, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2021, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2021, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2021, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2021, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2022, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2022, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2022, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2023, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2023, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2023, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2023, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2024, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2024, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2024, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2025, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2025, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2025, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2025, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2026, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2026, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2026, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2026, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2027, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2027, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2027, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2027, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2028, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2028, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2028, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2029, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2029, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2029, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2029, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jaunais gads")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lielā Piektdiena")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Lieldienas")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrās Lieldienas")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Darba svētki")); - let date = NaiveDate::from_ymd_res(2030, 5, 4)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas Neatkarības atjaunošanas diena")); - let date = NaiveDate::from_ymd_res(2030, 6, 23)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Līgo diena")); - let date = NaiveDate::from_ymd_res(2030, 6, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Jāņu dienu")); - let date = NaiveDate::from_ymd_res(2030, 11, 18)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Latvijas Republikas proklamēšanas diena")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētku vakars")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Otrie Ziemassvētki")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::LV, "Latvia", date, "Vecgada vakars")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Lesotho. -#[cfg(feature = "LS")] -pub mod ls { -use super::*; - -/// Generate holiday map for Lesotho. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Heroes Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2000, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Heroes Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2001, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 4, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Heroes Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2002, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2003, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2004, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2005, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day, Ascension Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2006, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2007, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day, Workers' Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2008, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2009, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2010, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2011, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2012, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2013, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2015, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2016, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day, Ascension Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2017, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2018, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2019, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2020, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2021, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2022, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2023, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2024, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2025, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2026, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2027, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day, Ascension Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2028, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2029, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 11)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Moshoeshoe's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Africa/Heroes Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 17)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2030, 10, 4)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "National Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::LS, "Lesotho", date, "Boxing Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Liechtenstein. -#[cfg(feature = "LI")] -pub mod li { -use super::*; - -/// Generate holiday map for Liechtenstein. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2000, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2000, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2000, 6, 22)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2000, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2001, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2001, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2001, 6, 14)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2001, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2002, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2002, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2002, 5, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2002, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2003, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2003, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2004, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2004, 6, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2004, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2005, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2005, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2005, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2006, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2006, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2006, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2007, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2007, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2007, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2008, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2008, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt, Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2008, 5, 22)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2008, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2009, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2009, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2009, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2010, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2010, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2010, 6, 3)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2010, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2011, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2011, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2011, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2012, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2012, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2012, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2013, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2013, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2013, 5, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2013, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2014, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2014, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2014, 6, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2014, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2015, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2015, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2015, 6, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2015, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2016, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2016, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2016, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2017, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2017, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2017, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2018, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2018, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2018, 5, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2018, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2019, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2019, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2019, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2020, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2020, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2020, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2021, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2021, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2021, 6, 3)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2021, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2022, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2022, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2023, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2023, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2023, 6, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2023, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2024, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2024, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2024, 5, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2024, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2025, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2025, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2025, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2026, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2026, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2026, 6, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2026, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2027, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2027, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2027, 5, 27)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2027, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2028, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2028, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2028, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2029, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2029, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2029, 5, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2029, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Neujahr")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Berchtoldstag")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Drei Könige")); - let date = NaiveDate::from_ymd_res(2030, 2, 2)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Mariä Lichtmess")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fasnachtsdienstag")); - let date = NaiveDate::from_ymd_res(2030, 3, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Josefstag")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostersonntag")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Tag der Arbeit")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstsonntag")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Fronleichnam")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Staatsfeiertag")); - let date = NaiveDate::from_ymd_res(2030, 9, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Geburt")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Allerheiligen")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Maria Empfängnis")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Heiliger Abend")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Weihnachten")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Stefanstag")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::LI, "Liechtenstein", date, "Silvester")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Lithuania. -#[cfg(feature = "LT")] -pub mod lt { -use super::*; - -/// Generate holiday map for Lithuania. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2000, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2000, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2000, 5, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2000, 6, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2000, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2001, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2001, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2001, 5, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2001, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2002, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2002, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2002, 6, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2002, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2003, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2003, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2003, 5, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2003, 6, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2003, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2003, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2004, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2004, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2004, 6, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2004, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2004, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2005, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2005, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena, Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2005, 6, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2005, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2005, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2006, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2006, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2006, 5, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2006, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2006, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2007, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2007, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2007, 5, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2007, 6, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2007, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2007, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2008, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2008, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2008, 5, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2008, 6, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2008, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2008, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2009, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2009, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2009, 5, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2009, 6, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2009, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2009, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2010, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2010, 5, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2010, 6, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2010, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2010, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2011, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2011, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena, Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2011, 6, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2011, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2011, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2012, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2012, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2012, 5, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2012, 6, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2012, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2012, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2013, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2013, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2013, 6, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2013, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2014, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2014, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2014, 5, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2014, 6, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2014, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2014, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2015, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2015, 5, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2015, 6, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2015, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2015, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2016, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2016, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena, Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2016, 6, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2016, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2017, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2017, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2017, 5, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2017, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2017, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2018, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2018, 5, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2018, 6, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2018, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2018, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2019, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2019, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2019, 5, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2019, 6, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2019, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2019, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2020, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2020, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2020, 5, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2020, 6, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2020, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2020, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2021, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2021, 6, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2021, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2021, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2021, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2022, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2022, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena, Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2022, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2022, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2022, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2023, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2023, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2023, 5, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2023, 6, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2023, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2023, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2023, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2024, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2024, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2024, 6, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2024, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2024, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2025, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2025, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2025, 5, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2025, 6, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2025, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2025, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2025, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2026, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2026, 5, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2026, 6, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2026, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2026, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2027, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2027, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2027, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2027, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2028, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2028, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2028, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2028, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2028, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2029, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2029, 5, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2029, 6, 3)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2029, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2029, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2029, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Naujieji metai")); - let date = NaiveDate::from_ymd_res(2030, 2, 16)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos valstybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2030, 3, 11)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Lietuvos nepriklausomybės atkūrimo diena")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykos")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Velykų antroji diena")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tarptautinė darbo diena")); - let date = NaiveDate::from_ymd_res(2030, 5, 5)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Motinos diena")); - let date = NaiveDate::from_ymd_res(2030, 6, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Tėvo diena")); - let date = NaiveDate::from_ymd_res(2030, 6, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Joninės, Rasos")); - let date = NaiveDate::from_ymd_res(2030, 7, 6)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Visų šventųjų diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2030, 11, 2)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Mirusiųjų atminimo diena (Vėlinės)")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kūčios")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų pirma diena")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::LT, "Lithuania", date, "Šv. Kalėdų antra diena")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Luxembourg. -#[cfg(feature = "LU")] -pub mod lu { -use super::*; - -/// Generate holiday map for Luxembourg. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2000, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2001, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2002, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2003, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2004, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2005, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2006, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2007, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart, Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2008, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2009, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2010, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2013, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2014, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2015, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2016, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2017, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2018, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2019, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2020, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2021, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2022, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2023, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart, Europadag")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2024, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2025, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2026, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2027, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2028, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2029, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Neijoerschdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Ouschterméindeg")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Dag vun der Aarbecht")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Europadag")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Christi Himmelfaart")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Péngschtméindeg")); - let date = NaiveDate::from_ymd_res(2030, 6, 23)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Nationalfeierdag")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Léiffrawëschdag")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Allerhellgen")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Chrëschtdag")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::LU, "Luxembourg", date, "Stiefesdag")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Madagascar. -#[cfg(feature = "MG")] -pub mod mg { -use super::*; - -/// Generate holiday map for Madagascar. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 18)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2000, 5, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 27)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2004, 6, 6)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 19)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 18)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2007, 6, 3)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day, Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2009, 6, 7)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 30)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 19)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2011, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2012, 6, 3)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 19)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 18)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 27)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2020, 6, 7)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 30)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 19)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 18)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2023, 6, 4)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 31)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday, Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 30)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 18)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 28)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 17)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 27)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Taom-baovao / New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny vehivavy / Women's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 29)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny mahery fo / Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 16)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny ray / Father's Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny olo-masina / All Saints' Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 11)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny noely / Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny paska / Easter Sunday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny paska / Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Pentekosta / Whit Sunday")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Alatsinain'ny pentekosta / Whit Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 26)?; - m.insert(date, Holiday::new(Country::MG, "Madagascar", date, "Fetin'ny Reny / Mother's Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Malaysia. -#[cfg(feature = "MY")] -pub mod my { -use super::*; - -/// Generate holiday map for Malaysia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2000, 5, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2000, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 2, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday [In lieu]")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2001, 5, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2001, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 11, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa, Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 12, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2001, 12, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2002, 5, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2002, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2002, 11, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali [In lieu]")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2003, 5, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2003, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 23)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2003, 2, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday [In lieu]")); - let date = NaiveDate::from_ymd_res(2003, 9, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2003, 3, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2004, 1, 23)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2004, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2004, 5, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad) [In lieu]")); - let date = NaiveDate::from_ymd_res(2004, 11, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2004, 2, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year), Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2005, 5, 23)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2005, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day [In lieu]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2006, 5, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2006, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year), Chinese New Year [In lieu]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day, Vesak Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2007, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 11, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2008, 5, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2008, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2008, 9, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2008, 1, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - let date = NaiveDate::from_ymd_res(2008, 12, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2009, 1, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2009, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2010, 5, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2010, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2011, 5, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa, National Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2011, 11, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2012, 5, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2012, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2012, 11, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2012, 9, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2012, 2, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad) [In lieu]")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2013, 5, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2013, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2013, 11, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2014, 2, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2014, 5, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2014, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2014, 9, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji [In lieu]")); - let date = NaiveDate::from_ymd_res(2014, 10, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2015, 2, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2015, 5, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2015, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2016, 5, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2016, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2017, 1, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2017, 5, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2017, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday [In lieu]")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2017, 9, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia General Election Holiday")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2018, 2, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2018, 5, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2018, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2018, 9, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong [In lieu]")); - let date = NaiveDate::from_ymd_res(2018, 9, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 7, 30)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Installation of New King")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2019, 5, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2019, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2019, 5, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2019, 10, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali [In lieu]")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji [In lieu]")); - let date = NaiveDate::from_ymd_res(2019, 9, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2020, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2020, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2020, 11, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday [In lieu]")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2021, 2, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2021, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2021, 8, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2022, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2022, 5, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji [In lieu]")); - let date = NaiveDate::from_ymd_res(2022, 7, 30)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2023, 1, 23)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2023, 5, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2023, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2024, 5, 22)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2024, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 30)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday [In lieu]")); - let date = NaiveDate::from_ymd_res(2024, 9, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2025, 1, 30)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2025, 5, 11)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 2)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2025, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 5, 12)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2025, 9, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day, Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2026, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2027, 2, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 20)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 7)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2027, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday [In lieu]")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2028, 1, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2028, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday, Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 27)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2029, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2029, 9, 17)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2029, 11, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year Holiday, Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 5, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Vesak Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Birthday of SPB Yang di-Pertuan Agong")); - let date = NaiveDate::from_ymd_res(2030, 8, 31)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 16)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Malaysia Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Deepavali* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Maulidur Rasul (Birthday of the Prophet Muhammad)* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Second day of Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::MY, "Malaysia", date, "Awal Muharram (Hijri New Year)* (*estimated)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Malawi. -#[cfg(feature = "MW")] -pub mod mw { -use super::*; - -/// Generate holiday map for Malawi. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 1, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 5, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 10, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 4)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 7, 8)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 7)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed), Christmas Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 10, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 5, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 10, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 5)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 7)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 28)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed), Christmas Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 10, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 3, 5)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 4)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 7, 8)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 7)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 28)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 10, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 5, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 10, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 5)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 7, 8)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed), Christmas Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day, Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 10, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 5, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 10, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 4)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 7, 8)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 7)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day (Observed), Christmas Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 17)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 10, 16)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 5)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 1, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "John Chilembwe Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 3)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 14)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Kamuzu Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 6)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 15)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Mother's Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Martyrs Day (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 7, 8)?; - m.insert(date, Holiday::new(Country::MW, "Malawi", date, "Independence Day (Observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Malta. -#[cfg(feature = "MT")] -pub mod mt { -use super::*; - -/// Generate holiday map for Malta. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2000, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2000, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2000, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2000, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2000, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2000, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2000, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2001, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2001, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2001, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2001, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2001, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2001, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2001, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2002, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2002, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2002, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2002, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2002, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2002, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2003, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2003, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2003, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2003, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2003, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2003, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2003, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2004, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2004, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2004, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2004, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2004, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2004, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2004, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2005, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2005, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2005, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2005, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2005, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2005, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2006, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2006, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2006, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2006, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2006, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2006, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2006, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2007, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2007, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2007, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2007, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2007, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2007, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2008, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2008, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2008, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2008, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2008, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2008, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2008, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2009, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2009, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2009, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2009, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2009, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2009, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2010, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2010, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2010, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2010, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2010, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2010, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2010, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2011, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2011, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2011, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2011, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2011, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2011, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2011, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2012, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2012, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2012, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2012, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2012, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2012, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2012, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2013, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2013, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2013, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2013, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2013, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2014, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2014, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2014, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2014, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2014, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2014, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2014, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2015, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2015, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2015, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2015, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2015, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2015, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2015, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2016, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2016, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2016, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2016, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2016, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2016, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2017, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2017, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2017, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2017, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2017, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2017, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2018, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2018, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2018, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2018, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2018, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2018, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2019, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2019, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2019, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2019, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2019, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2019, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2019, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2020, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2020, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2020, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2020, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2020, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2020, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2020, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2021, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2021, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2021, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2021, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2021, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2021, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2021, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2022, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2022, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2022, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2022, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2022, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2022, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2022, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2023, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2023, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2023, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2023, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2023, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2023, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2024, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2024, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2024, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2024, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2024, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2025, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2025, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2025, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2025, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2025, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2025, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2026, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2026, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2026, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2026, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2026, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2026, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2026, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2027, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2027, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2027, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2027, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2027, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2027, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2027, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2028, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2028, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2028, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2028, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2028, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2028, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2028, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2029, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2029, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2029, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2029, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2029, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2029, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "New Year")); - let date = NaiveDate::from_ymd_res(2030, 2, 10)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Paul's Shipwreck")); - let date = NaiveDate::from_ymd_res(2030, 3, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Joseph")); - let date = NaiveDate::from_ymd_res(2030, 3, 31)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 7)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Sette Giugno")); - let date = NaiveDate::from_ymd_res(2030, 6, 29)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of St. Peter and St. Paul")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Assumption")); - let date = NaiveDate::from_ymd_res(2030, 9, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of Our Lady of Victories")); - let date = NaiveDate::from_ymd_res(2030, 9, 21)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Feast of the Immaculate Conception")); - let date = NaiveDate::from_ymd_res(2030, 12, 13)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::MT, "Malta", date, "Christmas Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Mexico. -#[cfg(feature = "MX")] -pub mod mx { -use super::*; - -/// Generate holiday map for Mexico. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2001, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2004, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 30)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2006, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day], Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 3, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 11, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 11, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2009, 3, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 11, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 2, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2010, 3, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 30)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 2, 7)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday], Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 11, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 2, 6)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2012, 3, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 11, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government]")); - let date = NaiveDate::from_ymd_res(2012, 11, 30)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 4)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 11, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 2, 3)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 11, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2015, 3, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 11, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday], Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 11, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 2, 6)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2017, 3, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 9, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day], Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day], Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 3, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 11, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government]")); - let date = NaiveDate::from_ymd_res(2018, 11, 30)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 2, 4)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 11, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 3)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2020, 3, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 11, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 2, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2021, 3, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 11, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 2, 7)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday], Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 11, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 2, 6)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2023, 3, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day], Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day], Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 3, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 11, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government]")); - let date = NaiveDate::from_ymd_res(2024, 12, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 2, 3)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 11, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2026, 3, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 11, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 2, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 11, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas] (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 7)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2028, 3, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 15)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day], Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day], Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 3, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 17)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 11, 19)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 3, 21)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Natalicio de Benito Juárez [Benito Juárez's birthday]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 16)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 11, 18)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 11, 20)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 1)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government]")); - let date = NaiveDate::from_ymd_res(2030, 12, 2)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Transmisión del Poder Ejecutivo Federal [Change of Federal Government] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::MX, "Mexico", date, "Navidad [Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Moldova. -#[cfg(feature = "MD")] -pub mod md { -use super::*; - -/// Generate holiday map for Moldova. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2000, 4, 28)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele, Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor, Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2000, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2000, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2000, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2001, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2001, 4, 24)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2001, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2001, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2001, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2001, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2002, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2002, 5, 14)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2002, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2002, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2002, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2002, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2003, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2003, 5, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2003, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2003, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2003, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2003, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2004, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2004, 4, 20)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2004, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2004, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2004, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2004, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2005, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele, Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2005, 5, 10)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2005, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2005, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2005, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2005, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2006, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2006, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2006, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2006, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2006, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2007, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2007, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2007, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2007, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2007, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2007, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2008, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2008, 5, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2008, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2008, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2008, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2008, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2009, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2009, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2009, 4, 28)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2009, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2009, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2009, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2010, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2010, 4, 13)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2010, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2010, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2010, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2010, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2011, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2011, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2011, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2011, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2012, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2012, 4, 24)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2012, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2012, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2012, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2012, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2013, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2013, 5, 14)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2013, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2013, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2013, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2013, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2014, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2014, 4, 29)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2014, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2014, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2014, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2014, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2015, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2015, 4, 21)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2015, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2015, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2015, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2016, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele, Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2016, 5, 10)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2016, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2016, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2016, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2016, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2017, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2017, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2017, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2017, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2017, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2018, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2018, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2018, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2018, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2018, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2018, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2019, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2019, 5, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2019, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2019, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2019, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2019, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2020, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2020, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2020, 4, 28)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2020, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2020, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2020, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2021, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2021, 5, 11)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2021, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2021, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2021, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2021, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2022, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2022, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2022, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2022, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2023, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2023, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2023, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2023, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2023, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2024, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2024, 5, 14)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2024, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2024, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2024, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2024, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2025, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2025, 4, 29)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2025, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2025, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2025, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2025, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2026, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2026, 4, 10)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2026, 4, 21)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2026, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2026, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2026, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2027, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2027, 5, 11)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2027, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2027, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2027, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2027, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2028, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2028, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2028, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2028, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2028, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2029, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2029, 4, 17)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2029, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2029, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2029, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2029, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2030, 1, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Femeii")); - let date = NaiveDate::from_ymd_res(2030, 4, 26)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele")); - let date = NaiveDate::from_ymd_res(2030, 5, 7)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Paştele Blajinilor")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Internatională a Muncii")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Victoriei")); - let date = NaiveDate::from_ymd_res(2030, 6, 1)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2030, 8, 27)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Independenţei")); - let date = NaiveDate::from_ymd_res(2030, 8, 31)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Limba noastră")); - let date = NaiveDate::from_ymd_res(2030, 10, 8)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Ziua Natională a Vinului")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::MD, "Moldova", date, "Crăciunul")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Morocco. -#[cfg(feature = "MA")] -pub mod ma { -use super::*; - -/// Generate holiday map for Morocco. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2000, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2000, 3, 3)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2000, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2000, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2000, 7, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2000, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2000, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2000, 6, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2001, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2001, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2001, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2001, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2001, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2001, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2001, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2001, 6, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2002, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2002, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2002, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2002, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2002, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2002, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2002, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2002, 5, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2003, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2003, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2003, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2003, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2003, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2003, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2003, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2003, 5, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2004, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi, Fête du Travail")); - let date = NaiveDate::from_ymd_res(2004, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2004, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2004, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2004, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2004, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2004, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2005, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2005, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2005, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2005, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2005, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2005, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2005, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2005, 4, 22)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance, Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2006, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2006, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2006, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2006, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2006, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2006, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2006, 4, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2006, 4, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha, Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2007, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2007, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2007, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2007, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2007, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2007, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2007, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2007, 4, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2008, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2008, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2008, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2008, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2008, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2008, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2008, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2008, 1, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2009, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2009, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2009, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2009, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2009, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2009, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2009, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2009, 3, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2010, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2010, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2010, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2010, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2010, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2010, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2010, 12, 7)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2010, 2, 27)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2011, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2011, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2011, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2011, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2011, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha, Marche verte")); - let date = NaiveDate::from_ymd_res(2011, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2011, 2, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2012, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2012, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2012, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple, Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2012, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2012, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2012, 2, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2013, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2013, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2013, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2013, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2013, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2013, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2013, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2013, 1, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2014, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2014, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2014, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2014, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2014, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2014, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2014, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2014, 1, 13)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2014, 1, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2015, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2015, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2015, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2015, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2015, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2015, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2015, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2015, 1, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2015, 12, 23)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2016, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2016, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2016, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2016, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2016, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2016, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2016, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2016, 12, 12)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2017, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2017, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2017, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2017, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2017, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2017, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2017, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2018, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2018, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2018, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha, Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2018, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2018, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2018, 11, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2019, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2019, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2019, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2019, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2019, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2019, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2019, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 31)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2019, 11, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2020, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2020, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2020, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram, Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2020, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2020, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2020, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2020, 10, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2021, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2021, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2021, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2021, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2021, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2021, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2021, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2021, 10, 19)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2022, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2022, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram, Fête du Trône")); - let date = NaiveDate::from_ymd_res(2022, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2022, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2022, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2022, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2022, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2022, 10, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2023, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2023, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2023, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2023, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2023, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2023, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2023, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2023, 9, 28)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2024, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2024, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2024, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2024, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2024, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2024, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2024, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2025, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2025, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2025, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2025, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2025, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2025, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2025, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2025, 9, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2026, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2026, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2026, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2026, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2026, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2026, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2026, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2026, 8, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2027, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2027, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi, Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2027, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2027, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2027, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2027, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2028, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2028, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2028, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2028, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2028, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2028, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2028, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2028, 8, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2029, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2029, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2029, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2029, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2029, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2029, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2029, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2029, 7, 25)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Nouvel an - Premier janvier")); - let date = NaiveDate::from_ymd_res(2030, 1, 11)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la présentation du manifeste de l'indépendance")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Travail")); - let date = NaiveDate::from_ymd_res(2030, 7, 30)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête du Trône")); - let date = NaiveDate::from_ymd_res(2030, 8, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Journée de Oued Ed-Dahab")); - let date = NaiveDate::from_ymd_res(2030, 8, 20)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Commémoration de la révolution du Roi et du peuple")); - let date = NaiveDate::from_ymd_res(2030, 8, 21)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de la jeunesse")); - let date = NaiveDate::from_ymd_res(2030, 11, 6)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Marche verte")); - let date = NaiveDate::from_ymd_res(2030, 11, 18)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Fête de l'indépendance")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "1er Moharram")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - let date = NaiveDate::from_ymd_res(2030, 7, 14)?; - m.insert(date, Holiday::new(Country::MA, "Morocco", date, "Aid al Mawlid Annabawi")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Mozambique. -#[cfg(feature = "MZ")] -pub mod mz { -use super::*; - -/// Generate holiday map for Mozambique. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2000, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2000, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2000, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2000, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2000, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2000, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2000, 6, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional (PONTE)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2001, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2001, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2001, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2001, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2001, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2001, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2002, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2002, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2002, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2002, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2002, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2002, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2002, 2, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos (PONTE)")); - let date = NaiveDate::from_ymd_res(2002, 4, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana (PONTE)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2003, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2003, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2003, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2003, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2003, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2003, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2003, 9, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória (PONTE)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2004, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2004, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2004, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2004, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2004, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2004, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2005, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2005, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2005, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2005, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2005, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2005, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho (PONTE)")); - let date = NaiveDate::from_ymd_res(2005, 9, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas (PONTE)")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família (PONTE)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2006, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2006, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2006, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2006, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2006, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2006, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo (PONTE)")); - let date = NaiveDate::from_ymd_res(2006, 6, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional (PONTE)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2007, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2007, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2007, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2007, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2007, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2008, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2008, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2008, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2008, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2008, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2008, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos (PONTE)")); - let date = NaiveDate::from_ymd_res(2008, 9, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória (PONTE)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2009, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2009, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2009, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2009, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2009, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2009, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2009, 10, 5)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação (PONTE)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2010, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2010, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2010, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2010, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2010, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2010, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2011, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2011, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2011, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2011, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2011, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho (PONTE)")); - let date = NaiveDate::from_ymd_res(2011, 9, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas (PONTE)")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família (PONTE)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2012, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2012, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2012, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2012, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2012, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo (PONTE)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2013, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2013, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2013, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2013, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2013, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2013, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2013, 2, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos (PONTE)")); - let date = NaiveDate::from_ymd_res(2013, 4, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana (PONTE)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2014, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2014, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2014, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2014, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2014, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2014, 9, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória (PONTE)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2015, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2015, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2015, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2015, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2015, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2015, 10, 5)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação (PONTE)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2016, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2016, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2016, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2016, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2016, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2016, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho (PONTE)")); - let date = NaiveDate::from_ymd_res(2016, 9, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas (PONTE)")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família (PONTE)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2017, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2017, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2017, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2017, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2017, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo (PONTE)")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional (PONTE)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2018, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2018, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2018, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2018, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2018, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2018, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2019, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2019, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2019, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2019, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2019, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2019, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2019, 2, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos (PONTE)")); - let date = NaiveDate::from_ymd_res(2019, 4, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana (PONTE)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2020, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2020, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2020, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2020, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2020, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2020, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2020, 10, 5)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação (PONTE)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2021, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2021, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2021, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2021, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2021, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2021, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2022, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2022, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2022, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2022, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2022, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2022, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho (PONTE)")); - let date = NaiveDate::from_ymd_res(2022, 9, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas (PONTE)")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família (PONTE)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana, Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2023, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2023, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2023, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2023, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2023, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo (PONTE)")); - let date = NaiveDate::from_ymd_res(2023, 6, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional (PONTE)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2024, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2024, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2024, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2024, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2024, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2024, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2024, 4, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana (PONTE)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2025, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2025, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2025, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2025, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2025, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2025, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2025, 9, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória (PONTE)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2026, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2026, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2026, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2026, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2026, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2026, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2026, 10, 5)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação (PONTE)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2027, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2027, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2027, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2027, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2027, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2027, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2028, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2028, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2028, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2028, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2028, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2028, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2028, 6, 26)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional (PONTE)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2029, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2029, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2029, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2029, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2029, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2029, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Ano novo")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Carnaval")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos")); - let date = NaiveDate::from_ymd_res(2030, 4, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia Mundial do Trabalho")); - let date = NaiveDate::from_ymd_res(2030, 6, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Independência Nacional")); - let date = NaiveDate::from_ymd_res(2030, 9, 7)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Vitória")); - let date = NaiveDate::from_ymd_res(2030, 9, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia das Forças Armadas")); - let date = NaiveDate::from_ymd_res(2030, 10, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Paz e Reconciliação")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia de Natal e da Família")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia dos Heróis Moçambicanos (PONTE)")); - let date = NaiveDate::from_ymd_res(2030, 4, 8)?; - m.insert(date, Holiday::new(Country::MZ, "Mozambique", date, "Dia da Mulher Moçambicana (PONTE)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Netherlands. -#[cfg(feature = "NL")] -pub mod nl { -use super::*; - -/// Generate holiday map for Netherlands. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2000, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Bevrijdingsdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2002, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Bevrijdingsdag, Hemelvaart")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2008, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2010, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Bevrijdingsdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2013, 4, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koninginnedag")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2015, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Bevrijdingsdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2016, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2018, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2020, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Bevrijdingsdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2024, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Bevrijdingsdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2027, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2029, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Nieuwjaarsdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste paasdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Goede Vrijdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede paasdag")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Hemelvaart")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Pinksterdag")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Pinksterdag")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Eerste Kerstdag")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Tweede Kerstdag")); - let date = NaiveDate::from_ymd_res(2030, 5, 5)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Bevrijdingsdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::NL, "Netherlands", date, "Koningsdag")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Namibia. -#[cfg(feature = "NA")] -pub mod na { -use super::*; - -/// Generate holiday map for Namibia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Y2K changeover")); - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "International Human Rights Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 11)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "International Human Rights Day (Observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "International Human Rights Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day (Observed)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "International Human Rights Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "International Human Rights Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 5, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2004, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "International Human Rights Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 22)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day (Observed), Family Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day, Ascension Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2006, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 9, 11)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day (Observed)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday, Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day, Workers' Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2008, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day (Observed)")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 22)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day (Observed), Family Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 8, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day (Observed), Family Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day, Ascension Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 9, 11)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day (Observed)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2020, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 22)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day (Observed), Family Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 9, 11)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 5, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day, Ascension Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 11)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 27)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day (Observed)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 21)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 4)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Cassinga Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 10)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Day of the Namibian Women and Intr. Human Rights Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::NA, "Namibia", date, "Family Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// New Zealand. -#[cfg(feature = "NZ")] -pub mod nz { -use super::*; - -/// Generate holiday map for New Zealand. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 6, 5)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2000, 10, 23)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2001, 10, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 6, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2002, 10, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 6, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2003, 10, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 6, 7)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2004, 10, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 6, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2005, 10, 24)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 6, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2007, 10, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 6, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2008, 10, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2009, 10, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 6, 7)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2010, 10, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day, Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2011, 10, 24)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2012, 10, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 6, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2013, 10, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2014, 10, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2015, 10, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 6, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2016, 10, 24)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2017, 10, 23)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 6, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2018, 10, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 6, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2019, 10, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2020, 10, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 8)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 6, 7)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2021, 10, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 9, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen Elizabeth II Memorial Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 7)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Queen's Birthday")); - let date = NaiveDate::from_ymd_res(2022, 6, 24)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2022, 10, 24)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 6, 5)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2023, 7, 14)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2023, 10, 23)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 6, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2024, 6, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2024, 10, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 6, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2025, 6, 20)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2025, 10, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2026, 7, 10)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2026, 10, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 6, 7)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2027, 6, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2027, 10, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 7)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2028, 7, 14)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2028, 10, 23)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 6, 4)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2029, 7, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2029, 10, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Day after New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Waitangi Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Anzac Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 6, 3)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2030, 6, 21)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Matariki")); - let date = NaiveDate::from_ymd_res(2030, 10, 28)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::NZ, "New Zealand", date, "Boxing Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Nicaragua. -#[cfg(feature = "NI")] -pub mod ni { -use super::*; - -/// Generate holiday map for Nicaragua. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2000, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2000, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2000, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2001, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2001, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2001, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2002, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2002, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2002, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2002, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2003, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2003, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2003, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2003, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2004, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2004, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2004, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2004, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2005, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2005, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2005, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2006, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2006, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2006, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2007, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2007, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2007, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2008, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2008, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2008, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2008, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2009, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2009, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2009, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2009, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2010, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2010, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2010, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2010, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2011, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2011, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2011, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2012, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2012, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2012, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2013, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2013, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2013, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2014, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2014, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2014, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2014, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2015, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2015, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2015, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2015, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2016, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2016, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2016, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2017, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2017, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2017, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2017, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2018, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2018, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2018, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2019, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2019, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2019, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2020, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2020, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2020, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2021, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2021, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2021, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2021, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2022, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2022, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2022, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2023, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2023, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2023, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2024, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2024, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2025, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2025, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2025, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2025, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2026, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2026, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2026, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2026, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2027, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2027, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2027, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2027, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2028, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2028, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2028, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2029, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2029, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2029, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 19)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Revolución [Revolution Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 14)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Batalla de San Jacinto [Battle of San Jacinto]")); - let date = NaiveDate::from_ymd_res(2030, 9, 15)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Concepción de María [Virgin's Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Navidad [Christmas]")); - let date = NaiveDate::from_ymd_res(2030, 8, 1)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Bajada de Santo Domingo")); - let date = NaiveDate::from_ymd_res(2030, 8, 10)?; - m.insert(date, Holiday::new(Country::NI, "Nicaragua", date, "Subida de Santo Domingo")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Nigeria. -#[cfg(feature = "NG")] -pub mod ng { -use super::*; - -/// Generate holiday map for Nigeria. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2000, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2000, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2001, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2002, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2002, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2003, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid, Workers' day")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2004, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2004, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2005, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2005, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 4, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2006, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2006, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday, New Year's day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2007, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2007, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr, Independence day")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2008, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2009, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2009, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2010, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2010, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2011, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2011, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 2, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2012, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2013, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2013, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 1, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2014, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2015, 12, 23)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2015, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2015, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2016, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2016, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 10, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 5, 30)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2017, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2017, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 10, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2018, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2018, 5, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2018, 6, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday (Observed)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2019, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2019, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid (Observed)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2020, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2021, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2021, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 6, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2022, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2022, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 10, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 6, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2023, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2023, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 4, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 10, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2024, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2024, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid (Observed)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2025, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2026, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2026, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2026, 3, 23)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2027, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2027, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 8, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 6, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2028, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2028, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 10, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2029, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2029, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "New Year's day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Workers' day")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid")); - let date = NaiveDate::from_ymd_res(2030, 10, 1)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Independence day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Christmas day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Boxing day")); - let date = NaiveDate::from_ymd_res(2030, 6, 12)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Democracy day")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 4, 16)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Eid al-Adha Holiday (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 7, 15)?; - m.insert(date, Holiday::new(Country::NG, "Nigeria", date, "Mawlid (Observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// North Macedonia. -#[cfg(feature = "MK")] -pub mod mk { -use super::*; - -/// Generate holiday map for North Macedonia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox), Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2000, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2001, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2002, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2003, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2004, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2004, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2005, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2006, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle, Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2007, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2008, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2008, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2009, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2010, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2011, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2012, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2013, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2014, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2015, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2016, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2017, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2018, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2019, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr, Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2020, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2020, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2021, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2022, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2023, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2024, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2025, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2026, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2027, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2028, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2029, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Christmas Day (Orthodox)")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Easter Monday(Orthodox)")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 24)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saints Cyril and Methodius Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 2)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 11)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of Macedonian Uprising in 1941")); - let date = NaiveDate::from_ymd_res(2030, 10, 23)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Day of the Macedonian Revolutionary Struggle")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Saint Clement of Ohrid Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::MK, "North Macedonia", date, "Eid al-Fitr")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Norway. -#[cfg(feature = "NO")] -pub mod no { -use super::*; - -/// Generate holiday map for Norway. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2000, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2001, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2002, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2003, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2004, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2005, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2006, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag, Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag, Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2008, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2009, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2010, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2011, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag, Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2013, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2014, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2015, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2016, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2017, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2018, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2019, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2020, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2021, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2022, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2023, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2024, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2025, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2026, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag, Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2028, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2029, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første nyttårsdag")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Arbeidernes dag")); - let date = NaiveDate::from_ymd_res(2030, 5, 17)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Grunnlovsdag")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første juledag")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre juledag")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Skjærtorsdag")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Langfredag")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første påskedag")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre påskedag")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Kristi himmelfartsdag")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Første pinsedag")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::NO, "Norway", date, "Andre pinsedag")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Pakistan. -#[cfg(feature = "PK")] -pub mod pk { -use super::*; - -/// Generate holiday map for Pakistan. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 4, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 4, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 12, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 4, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 4, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 3, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 3, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 3, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 3, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated), Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 11, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 3)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 3, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 3, 2)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 11, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2005, 4, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2005, 2, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2005, 2, 19)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 10, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2006, 4, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2006, 2, 8)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2006, 2, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2007, 1, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2007, 1, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 10, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2008, 1, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2008, 1, 19)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 9, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 30)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2009, 12, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 9, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 19)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2010, 3, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2010, 12, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2010, 12, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha, Iqbal Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 9, 2)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 8)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2011, 2, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2011, 12, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2011, 12, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi, Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2012, 11, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2012, 11, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 8, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2013, 10, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2013, 11, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2013, 11, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 7, 30)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 7, 31)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 8)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2014, 1, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2014, 11, 3)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2014, 11, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2015, 1, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2015, 10, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2015, 10, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 7, 8)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2016, 12, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2016, 10, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2016, 10, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 3)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2017, 9, 30)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2017, 10, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2018, 11, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2018, 9, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2018, 9, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha, Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2019, 11, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2019, 9, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2019, 9, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2020, 10, 30)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2020, 8, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2020, 8, 30)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 5, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2021, 10, 19)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2021, 8, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2021, 8, 19)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 5, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha")); - let date = NaiveDate::from_ymd_res(2022, 10, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi")); - let date = NaiveDate::from_ymd_res(2022, 8, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - let date = NaiveDate::from_ymd_res(2022, 8, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 30)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 7, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 7, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 7, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 7, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 7, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 7, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 29)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 6, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 6, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated), Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 6, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 6, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 6, 3)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 26)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 24)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated), Kashmir Solidarity Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 23)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Pakistan Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 11, 9)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Iqbal Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Quaid-e-Azam Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid-ul-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Eid Milad-un-Nabi* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 5, 12)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 5, 13)?; - m.insert(date, Holiday::new(Country::PK, "Pakistan", date, "Ashura* (*estimated)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Paraguay. -#[cfg(feature = "PY")] -pub mod py { -use super::*; - -/// Generate holiday map for Paraguay. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2000, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2001, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2002, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2003, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2004, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2005, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2006, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2007, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2008, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 9, 10)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2009, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 6, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2010, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 4, 19)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2011, 4, 20)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2011, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2011, 5, 16)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2011, 12, 23)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2011, 12, 30)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2011, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 4, 4)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2012, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 3, 27)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 4)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2013, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 4, 16)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 16)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2014, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 4, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 10)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 11)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2015, 9, 28)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 3, 23)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2016, 10, 3)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2017, 3, 28)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2017, 10, 2)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 26)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 6, 11)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2018, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 4, 17)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2019, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 4, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2020, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2021, 9, 27)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 4, 13)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public sector Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Public Holiday")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2022, 10, 3)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2023, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2024, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2025, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2026, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2027, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2028, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2029, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de los Héroes de la Patria [Patriots Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día del Trabajador [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 14)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Independencia Nacional [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 12)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Paz del Chaco [Chaco Armistice Day]")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Fundación de Asunción [Asuncion Foundation's Day]")); - let date = NaiveDate::from_ymd_res(2030, 9, 29)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Batalla de Boquerón [Boqueron Battle Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Día de la Virgen de Caacupé [Caacupe Virgin Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::PY, "Paraguay", date, "Navidad [Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Peru. -#[cfg(feature = "PE")] -pub mod pe { -use super::*; - -/// Generate holiday map for Peru. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2000, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2000, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2000, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2001, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2001, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2001, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2002, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2002, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2002, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2003, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2003, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2003, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2004, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2004, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2004, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2005, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2005, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2005, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2006, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2006, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2006, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2007, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2007, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2007, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2008, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2008, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2008, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2009, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2009, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2009, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2010, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2010, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2010, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2011, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2011, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2012, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2012, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2012, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2013, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2013, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2013, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2014, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2014, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2015, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2015, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2015, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2016, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2016, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2016, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2017, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2017, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2017, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2018, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2018, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2018, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2019, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2019, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2019, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2020, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2020, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2020, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2021, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2021, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2021, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2022, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2022, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2023, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2023, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2023, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2024, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2024, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2024, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2025, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2025, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2025, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2026, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2026, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2026, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2027, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2027, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2027, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 27)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2028, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2028, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2028, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2029, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2029, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2029, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "San Pedro y San Pablo [Feast of Saints Peter and Paul]")); - let date = NaiveDate::from_ymd_res(2030, 7, 28)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 29)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de las Fuerzas Armadas y la Policía del Perú")); - let date = NaiveDate::from_ymd_res(2030, 8, 30)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Santa Rosa de Lima")); - let date = NaiveDate::from_ymd_res(2030, 10, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Combate Naval de Angamos [Battle of Angamos]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Sábado de Gloria [Holy Saturday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Domingo de Resurrección [Easter Sunday]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día del Trabajo [Labour Day]")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Día de Todos Los Santos [All Saints Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Inmaculada Concepción [Immaculate Conception]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::PE, "Peru", date, "Navidad [Christmas]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Poland. -#[cfg(feature = "PL")] -pub mod pl { -use super::*; - -/// Generate holiday map for Poland. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2000, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2000, 6, 22)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2000, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2001, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2001, 6, 14)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2001, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2002, 5, 30)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2002, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2003, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2003, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2004, 6, 10)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2005, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2006, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2006, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2007, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2007, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2008, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2008, 5, 22)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2008, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2009, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2009, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2010, 6, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2010, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2011, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2012, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2012, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2013, 5, 30)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2014, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2014, 6, 19)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2014, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2015, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2015, 6, 4)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2015, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2016, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2016, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2017, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2017, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 11, 12)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości - 100-lecie")); - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2018, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2018, 5, 31)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2018, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2019, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2020, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2020, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2021, 6, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2021, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2022, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2023, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2023, 6, 8)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2023, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2024, 5, 30)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2025, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2025, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2026, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2026, 6, 4)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2026, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2027, 5, 27)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2027, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2028, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2028, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2029, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2029, 5, 31)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2029, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Nowy Rok")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Trzech Króli")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Niedziela Wielkanocna")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Poniedziałek Wielkanocny")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Państwowe")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Święto Narodowe Trzeciego Maja")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Zielone Świątki")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Dzień Bożego Ciała")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Wniebowzięcie Najświętszej Marii Panny")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Uroczystość Wszystkich Świętych")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Narodowe Święto Niepodległości")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (pierwszy dzień)")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::PL, "Poland", date, "Boże Narodzenie (drugi dzień)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Portugal. -#[cfg(feature = "PT")] -pub mod pt { -use super::*; - -/// Generate holiday map for Portugal. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2000, 6, 22)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2000, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2000, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2000, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2000, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2001, 6, 14)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2001, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2001, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2001, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2001, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2002, 5, 30)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2002, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2002, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2002, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2002, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2003, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2003, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2003, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2004, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus, Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2004, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2004, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2005, 5, 26)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2005, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2005, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2005, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2005, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2006, 6, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2006, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2006, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2006, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2006, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2007, 6, 7)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2007, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2007, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2007, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2007, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2008, 5, 22)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2008, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2008, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2008, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2009, 6, 11)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2009, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2009, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2009, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2009, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2010, 6, 3)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2010, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2010, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2010, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2010, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2011, 6, 23)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2011, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2011, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2011, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2012, 6, 7)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2012, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2012, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2012, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2012, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2013, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2013, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2014, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2014, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2015, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2015, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2016, 5, 26)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2016, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2016, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2016, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2016, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2017, 6, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2017, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2017, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2018, 5, 31)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2018, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2018, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2018, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2018, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2019, 6, 20)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2019, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2019, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2020, 6, 11)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2020, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2020, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2020, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2020, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2021, 6, 3)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2021, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2021, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2021, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2021, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2022, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2022, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2022, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2023, 6, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2023, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2023, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2023, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2024, 5, 30)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2024, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2024, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2024, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2025, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2025, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2025, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2025, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2026, 6, 4)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2026, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2026, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2026, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2026, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2027, 5, 27)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2027, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2027, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2027, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2028, 6, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2028, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2028, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2028, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2029, 5, 31)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2029, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2029, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2029, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Ano Novo")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Sexta-feira Santa")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Páscoa")); - let date = NaiveDate::from_ymd_res(2030, 6, 20)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Corpo de Deus")); - let date = NaiveDate::from_ymd_res(2030, 10, 5)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Implantação da República")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Todos os Santos")); - let date = NaiveDate::from_ymd_res(2030, 12, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Restauração da Independência")); - let date = NaiveDate::from_ymd_res(2030, 4, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia da Liberdade")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia do Trabalhador")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Portugal")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Assunção de Nossa Senhora")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Imaculada Conceição")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::PT, "Portugal", date, "Dia de Natal")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Romania. -#[cfg(feature = "RO")] -pub mod ro { -use super::*; - -/// Generate holiday map for Romania. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2000, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2000, 4, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele, Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2000, 6, 18)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2000, 6, 19)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2000, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2000, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2001, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2001, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2002, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2002, 6, 23)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2002, 6, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2002, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2002, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2003, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2003, 6, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2003, 6, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2003, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2003, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2004, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2004, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2004, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2005, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele, Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2005, 6, 19)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2005, 6, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2005, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2005, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2006, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2006, 6, 11)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2006, 6, 12)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2006, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2006, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2007, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2007, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2007, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2008, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2008, 6, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2008, 6, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2008, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2008, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2009, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2009, 4, 17)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2009, 6, 7)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2009, 6, 8)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2009, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2009, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2010, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2010, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2010, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2011, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2011, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2011, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2012, 6, 3)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2012, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2012, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2013, 6, 23)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2013, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2013, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2014, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2014, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2014, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2015, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2015, 5, 31)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2015, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2015, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2016, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele, Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2016, 6, 19)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2016, 6, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2016, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2016, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2017, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2017, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2017, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2018, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2018, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2018, 5, 27)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2018, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2018, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2019, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2019, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2019, 6, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2019, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2019, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2020, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2020, 4, 17)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2020, 6, 7)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2020, 6, 8)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2020, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2020, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2021, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2021, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2021, 6, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2021, 6, 21)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2021, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2021, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2022, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2022, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2022, 6, 12)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2022, 6, 13)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2022, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2022, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2023, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2023, 6, 4)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2023, 6, 5)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2023, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2023, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2024, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2024, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2024, 6, 23)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2024, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2024, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2025, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2025, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2025, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2025, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2026, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2026, 4, 10)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile, Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2026, 5, 31)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2026, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2026, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2027, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2027, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2027, 6, 20)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2027, 6, 21)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2027, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2027, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2028, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2028, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2028, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2028, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2029, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2029, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2029, 5, 27)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2029, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2029, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Anul Nou")); - let date = NaiveDate::from_ymd_res(2030, 1, 24)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Unirea Principatelor Române")); - let date = NaiveDate::from_ymd_res(2030, 4, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Paștele")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Muncii")); - let date = NaiveDate::from_ymd_res(2030, 6, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Copilului")); - let date = NaiveDate::from_ymd_res(2030, 6, 16)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Rusaliile")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Adormirea Maicii Domnului")); - let date = NaiveDate::from_ymd_res(2030, 11, 30)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Sfântul Andrei")); - let date = NaiveDate::from_ymd_res(2030, 12, 1)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Ziua Națională a României")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::RO, "Romania", date, "Crăciunul")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Russia. -#[cfg(feature = "RU")] -pub mod ru { -use super::*; - -/// Generate holiday map for Russia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2000, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2000, 11, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2001, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2001, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2001, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2001, 11, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2002, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2002, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2002, 11, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2003, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2003, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2003, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2003, 11, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2004, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2004, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2004, 11, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Октябрьской революции")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2005, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2005, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2005, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2006, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2006, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2006, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2006, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2007, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2007, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2007, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2007, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2008, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2008, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2008, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2008, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2009, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2009, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2009, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2009, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2010, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2010, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2010, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2010, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2011, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2011, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2011, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2012, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2012, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2012, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2012, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2013, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2013, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2013, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2014, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2014, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2014, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2014, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2015, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2015, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2015, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2015, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2016, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2016, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2016, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2016, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2017, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2017, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2017, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2017, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2018, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2018, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2018, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2018, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2019, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2019, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2019, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2019, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2020, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2020, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2020, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2020, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2021, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2021, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2021, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2021, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2022, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2022, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2022, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2022, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2023, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2023, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2023, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2023, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2024, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2024, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2024, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2024, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2025, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2025, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2025, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2025, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2026, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2026, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2026, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2026, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2027, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2027, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2027, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2027, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2028, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2028, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2028, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2028, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2029, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2029, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2029, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2029, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 3)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 5)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Православное Рождество")); - let date = NaiveDate::from_ymd_res(2030, 1, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - let date = NaiveDate::from_ymd_res(2030, 2, 23)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День защитника отечества")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День женщин")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Праздник Весны и Труда")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День Победы")); - let date = NaiveDate::from_ymd_res(2030, 6, 12)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День России")); - let date = NaiveDate::from_ymd_res(2030, 11, 4)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "День народного единства")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::RU, "Russia", date, "Новый год")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Saudi Arabia. -#[cfg(feature = "SA")] -pub mod sa { -use super::*; - -/// Generate holiday map for Saudi Arabia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 29)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2000, 3, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2000, 3, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 12, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2002, 12, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2002, 2, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2002, 2, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 11, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2003, 2, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 11, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 11, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 1, 31)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 11, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2005, 11, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2005, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2005, 9, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2006, 12, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 10, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2007, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 9, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2008, 10, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2008, 12, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 29)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2009, 12, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 9, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2010, 9, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2010, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2011, 9, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2011, 11, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 8, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 29)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2012, 10, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2012, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 8, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2013, 8, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 7, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2014, 10, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2014, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2015, 7, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 7, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2016, 9, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2016, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 8, 31)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2017, 9, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2017, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 6, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2018, 6, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2019, 8, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2019, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 5, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2020, 7, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2020, 8, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2020, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 5, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2021, 5, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2021, 7, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2022, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2022, 9, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2022, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2023, 4, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2023, 6, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 7, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2023, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2023, 9, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2023, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 4, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2024, 6, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2024, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2024, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 4, 2)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2025, 6, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2025, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2025, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - let date = NaiveDate::from_ymd_res(2025, 2, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday (observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 3, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2026, 3, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2026, 5, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 29)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 30)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2026, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2026, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2027, 5, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2027, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2027, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 3, 1)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2028, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2028, 9, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2028, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 18)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2029, 2, 19)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 26)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2029, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 12)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Arafat Day Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 16)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2030, 4, 17)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Eid al-Adha Holiday (observed)")); - let date = NaiveDate::from_ymd_res(2030, 9, 23)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 22)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 21)?; - m.insert(date, Holiday::new(Country::SA, "Saudi Arabia", date, "Founding Day Holiday (observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Serbia. -#[cfg(feature = "RS")] -pub mod rs { -use super::*; - -/// Generate holiday map for Serbia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2000, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2000, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса, Празник рада")); - let date = NaiveDate::from_ymd_res(2000, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2000, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2000, 4, 28)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2000, 4, 29)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2001, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2001, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2001, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2001, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2001, 11, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2002, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2002, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2002, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2002, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2002, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2002, 5, 4)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2003, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2003, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2003, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2003, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2003, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2003, 4, 26)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2004, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2004, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2004, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2005, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2005, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс, Празник рада")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса, Празник рада")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2005, 4, 29)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2006, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2006, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2006, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2006, 4, 21)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2006, 4, 22)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2007, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2007, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2007, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2007, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2007, 11, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2008, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2008, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2008, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2008, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2008, 4, 26)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2009, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2009, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2009, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2009, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2009, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2009, 4, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2009, 4, 18)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2010, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2011, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2012, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2012, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2012, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2012, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2012, 11, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 4, 13)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2012, 4, 14)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2013, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2013, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2013, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2013, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2013, 5, 4)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2014, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2014, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2014, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2014, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2014, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2015, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2015, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2015, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2015, 4, 10)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2015, 4, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2016, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2016, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс, Празник рада")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса, Празник рада")); - let date = NaiveDate::from_ymd_res(2016, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2016, 4, 29)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2016, 4, 30)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2017, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2017, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2017, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2017, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2018, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2018, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2018, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2018, 11, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 4, 6)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2018, 4, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2019, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2019, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2019, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2019, 4, 26)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2020, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2020, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2020, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2020, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2020, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2020, 4, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2020, 4, 18)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота, Празник рада")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс, Празник рада")); - let date = NaiveDate::from_ymd_res(2021, 5, 4)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2022, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2022, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2022, 4, 22)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2022, 4, 23)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2023, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2023, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2023, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2023, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2023, 4, 14)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2023, 4, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2024, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2024, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2024, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2024, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2024, 5, 4)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2025, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2025, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2025, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2025, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2025, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2026, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2026, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2026, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2026, 4, 10)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2026, 4, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2027, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2027, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота, Празник рада")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс, Празник рада")); - let date = NaiveDate::from_ymd_res(2027, 5, 4)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2028, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2028, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2028, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2028, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2029, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2029, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2029, 11, 12)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 4, 6)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2029, 4, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Нова година")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Божић")); - let date = NaiveDate::from_ymd_res(2030, 2, 15)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2030, 2, 16)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан државности Србије")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2030, 5, 2)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Празник рада")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Дан примирја у Првом светском рату")); - let date = NaiveDate::from_ymd_res(2030, 4, 26)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велики петак")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Велика субота")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Васкрс")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::RS, "Serbia", date, "Други дан Васкрса")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Singapore. -#[cfg(feature = "SG")] -pub mod sg { -use super::*; - -/// Generate holiday map for Singapore. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day)")); - let date = NaiveDate::from_ymd_res(2000, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after)")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 11, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Polling Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa, Hari Raya Puasa [Sunday]")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 11, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa [In lieu]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali, Deepavali [Sunday]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 4)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali [In lieu]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 15)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 23)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2004, 1, 23)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa, Hari Raya Puasa [Sunday]")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji, Hari Raya Haji [Sunday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji [In lieu]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day, Labour Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 23)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day, Christmas Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day [In lieu]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 5, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Polling Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day, New Year's Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 21)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 31)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 11, 8)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 19)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2009, 1, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa, Hari Raya Puasa [Sunday]")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day, National Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2009, 10, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2009, 8, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day [In lieu]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 28)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 5, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Polling Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji, Hari Raya Haji [Sunday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day, Labour Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2011, 5, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day, Christmas Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji [In lieu]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day [In lieu]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day, New Year's Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa, Hari Raya Puasa [Sunday]")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 11, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa [In lieu]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2014, 2, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji, Hari Raya Haji [Sunday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 22)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji [In lieu]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 8, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "SG50 Public Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 11)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Polling Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2015, 2, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day, National Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2015, 11, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day [In lieu]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day, Labour Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day, Christmas Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day [In lieu]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day, New Year's Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2017, 1, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa, Hari Raya Puasa [Sunday]")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa [In lieu]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2018, 2, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji, Hari Raya Haji [Sunday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 19)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day, Vesak Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2019, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali, Deepavali [Sunday]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji [In lieu]")); - let date = NaiveDate::from_ymd_res(2019, 5, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2019, 10, 28)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali [In lieu]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 7, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Polling Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa, Hari Raya Puasa [Sunday]")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day, National Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2020, 11, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa [In lieu]")); - let date = NaiveDate::from_ymd_res(2020, 8, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day [In lieu]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2021, 2, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 4)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day, Labour Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 15)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day, Vesak Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2022, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day, Christmas Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2022, 5, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day [In lieu]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day, New Year's Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2023, 1, 23)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali, Deepavali [Sunday]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day [In lieu]")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2023, 11, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali [In lieu]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated), Hari Raya Haji* (*estimated) [Sunday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 22)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day)")); - let date = NaiveDate::from_ymd_res(2024, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after)")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated) [In lieu]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2025, 1, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated), Hari Raya Puasa* (*estimated) [Sunday]")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 11)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day), Vesak Day* (*estimated; ~10% chance +/- 1 day) [Sunday]")); - let date = NaiveDate::from_ymd_res(2025, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after)")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated) [In lieu]")); - let date = NaiveDate::from_ymd_res(2025, 5, 12)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day) [In lieu]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 31)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day), Vesak Day* (*estimated; ~10% chance +/- 1 day) [Sunday]")); - let date = NaiveDate::from_ymd_res(2026, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day, National Day [Sunday]")); - let date = NaiveDate::from_ymd_res(2026, 11, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after)")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day) [In lieu]")); - let date = NaiveDate::from_ymd_res(2026, 8, 10)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day [In lieu]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2027, 2, 7)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated), Hari Raya Haji* (*estimated) [Sunday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 20)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day)")); - let date = NaiveDate::from_ymd_res(2027, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after)")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated) [In lieu]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2028, 1, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day)")); - let date = NaiveDate::from_ymd_res(2028, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after)")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 27)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day), Vesak Day* (*estimated; ~10% chance +/- 1 day) [Sunday]")); - let date = NaiveDate::from_ymd_res(2029, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 4)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after), Deepavali* (*estimated; rarely on day after) [Sunday]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day) [In lieu]")); - let date = NaiveDate::from_ymd_res(2029, 11, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after) [In lieu]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Chinese New Year [Sunday]")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year, Hari Raya Puasa* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Hari Raya Haji* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 16)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Vesak Day* (*estimated; ~10% chance +/- 1 day)")); - let date = NaiveDate::from_ymd_res(2030, 8, 9)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Deepavali* (*estimated; rarely on day after)")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::SG, "Singapore", date, "Chinese New Year [In lieu]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Slovakia. -#[cfg(feature = "SK")] -pub mod sk { -use super::*; - -/// Generate holiday map for Slovakia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2000, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2000, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2000, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2000, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2000, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2001, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2001, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2001, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2001, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2001, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2001, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2002, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2002, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2002, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2002, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2002, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2002, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2003, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2003, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2003, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2003, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2003, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2003, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2004, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2004, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2004, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2004, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2004, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2005, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2005, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2005, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2005, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2005, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2005, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2006, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2006, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2006, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2006, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2006, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2006, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2007, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2007, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2007, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2007, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2007, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2007, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2008, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2008, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2008, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2008, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2008, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2008, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2009, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2009, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2009, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2009, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2009, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2009, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2010, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2010, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2010, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2010, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2011, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2011, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2011, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2011, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2011, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2012, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2012, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2012, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2012, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2012, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2012, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2013, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2013, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2013, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2013, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2013, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2013, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2014, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2014, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2014, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2014, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2014, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2014, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2015, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2015, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2015, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2015, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2015, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2015, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2016, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2016, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2016, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2016, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2016, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2016, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2017, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2017, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2017, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2017, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2017, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 10, 30)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "100. výročie prijatia Deklarácie slovenského národa")); - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2018, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2018, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2018, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2018, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2018, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2018, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2019, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2019, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2019, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2019, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2019, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2019, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2020, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2020, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2020, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2020, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2020, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2020, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2021, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2021, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2021, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2021, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2021, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2022, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2022, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2022, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2022, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2022, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2022, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2023, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2023, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2023, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2023, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2023, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2023, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2024, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2024, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2024, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2024, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2024, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2025, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2025, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2025, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2025, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2025, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2025, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2026, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2026, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2026, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2026, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2026, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2026, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2027, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2027, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2027, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2027, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2027, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2028, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2028, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2028, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2028, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2028, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2029, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2029, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2029, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2029, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2029, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2029, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň vzniku Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Zjavenie Pána (Traja králi a vianočnýsviatok pravoslávnych kresťanov)")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľký piatok")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Veľkonočný pondelok")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok práce")); - let date = NaiveDate::from_ymd_res(2030, 5, 8)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň víťazstva nad fašizmom")); - let date = NaiveDate::from_ymd_res(2030, 7, 5)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok svätého Cyrila a svätého Metoda")); - let date = NaiveDate::from_ymd_res(2030, 8, 29)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Výročie Slovenského národného povstania")); - let date = NaiveDate::from_ymd_res(2030, 9, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň Ústavy Slovenskej republiky")); - let date = NaiveDate::from_ymd_res(2030, 9, 15)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sedembolestná Panna Mária")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Sviatok Všetkých svätých")); - let date = NaiveDate::from_ymd_res(2030, 11, 17)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Deň boja za slobodu a demokraciu")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Štedrý deň")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Prvý sviatok vianočný")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::SK, "Slovakia", date, "Druhý sviatok vianočný")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Slovenia. -#[cfg(feature = "SI")] -pub mod si { -use super::*; - -/// Generate holiday map for Slovenia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2000, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2000, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2000, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2000, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2000, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2001, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2001, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2001, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2001, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2001, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2002, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2002, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2002, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2002, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2002, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2003, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2003, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2003, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2003, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2004, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2004, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2004, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2004, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2005, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2005, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2005, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2006, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2006, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2006, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2006, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2007, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2007, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2007, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2007, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2007, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2008, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2008, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2008, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2009, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2009, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2009, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2009, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2009, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2010, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2010, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2010, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2010, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2010, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2011, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2011, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2011, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2011, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2012, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2012, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2012, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2012, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2012, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2013, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2013, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2013, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2013, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2013, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2014, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2014, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2014, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2014, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2014, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2015, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2015, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2015, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2015, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2015, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2016, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2016, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2016, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2017, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2017, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2017, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2017, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2018, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2018, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2018, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2018, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2018, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2019, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2019, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2019, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2019, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2020, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2020, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2020, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2020, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2020, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2021, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2021, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2021, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2021, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2022, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2022, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2022, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2022, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2023, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2023, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2023, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2023, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2023, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2024, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2024, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2024, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2024, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2024, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2025, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2025, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2025, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2025, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2025, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2026, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2026, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2026, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2026, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2026, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2027, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2027, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2027, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2028, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2028, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2028, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2028, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2028, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2029, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2029, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2029, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2029, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2029, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "novo leto")); - let date = NaiveDate::from_ymd_res(2030, 2, 8)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Prešernov dan")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Velikonočni ponedeljek")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan upora proti okupatorju")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2030, 5, 2)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "praznik dela")); - let date = NaiveDate::from_ymd_res(2030, 6, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan državnosti")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Marijino vnebovzetje")); - let date = NaiveDate::from_ymd_res(2030, 10, 31)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan reformacije")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan spomina na mrtve")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "Božič")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::SI, "Slovenia", date, "dan samostojnosti in enotnosti")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// South Africa. -#[cfg(feature = "ZA")] -pub mod za { -use super::*; - -/// Generate holiday map for South Africa. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Y2K changeover")); - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2000, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Y2K changeover (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 9, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day (Observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2001, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation (Observed)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2002, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day (Observed)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2003, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 4, 14)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National and provincial government elections")); - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2004, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2004, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 3, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2005, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 3, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Local government elections")); - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2006, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2006, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 9, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2007, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation (Observed)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 5, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Public holiday by presidential decree")); - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday, Human Rights Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2008, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 4, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National and provincial government elections")); - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2009, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 10)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 5, 18)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Local government elections")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Public holiday by presidential decree")); - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2012, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 12, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2013, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day (Observed)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 5, 7)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National and provincial government elections")); - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2014, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 28)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 10)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 8, 3)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Local government elections")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Public holiday by presidential decree")); - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2017, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 9, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2018, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation (Observed)")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 5, 8)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National and provincial government elections")); - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day (Observed)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2020, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2020, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 10)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Municipal elections")); - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2021, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Public holiday by presidential decree")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2023, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 9, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2024, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day (Observed)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2025, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 28)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 10)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2028, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2029, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation (Observed)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Family Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Reconciliation")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Day of Goodwill")); - let date = NaiveDate::from_ymd_res(2030, 3, 21)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Human Rights Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 27)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Freedom Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 16)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 9)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "National Women's Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 24)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Heritage Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::ZA, "South Africa", date, "Youth Day (Observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// South Korea. -#[cfg(feature = "KR")] -pub mod kr { -use super::*; - -/// Generate holiday map for South Korea. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Tree Planting Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2000, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2000, 9, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2000, 9, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2000, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 23)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Tree Planting Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha, Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2001, 10, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2001, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Tree Planting Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 20)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2002, 9, 21)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2002, 9, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2002, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 31)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Tree Planting Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2003, 9, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2003, 9, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2003, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 21)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 23)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Tree Planting Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2004, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2004, 9, 27)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2004, 9, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2004, 9, 29)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2004, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Tree Planting Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2005, 9, 18)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2005, 9, 19)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2005, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha, Children's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2006, 10, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2006, 10, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2006, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2007, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Constitution Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2007, 9, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2007, 9, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2007, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2008, 9, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2008, 9, 14)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2008, 9, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 27)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2009, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2009, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok, National Foundation Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 21)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2010, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 21)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2010, 9, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2010, 9, 23)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2010, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2011, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2011, 9, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2011, 9, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2011, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2012, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 29)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2012, 9, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2012, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 18)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2013, 9, 19)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2013, 9, 20)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2013, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2014, 9, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2014, 9, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2014, 9, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Chuseok")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 18)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 20)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2015, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2015, 9, 27)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2015, 9, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2015, 9, 29)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Chuseok")); - let date = NaiveDate::from_ymd_res(2015, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 14)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 14)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2016, 9, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2016, 9, 16)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2016, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 27)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 29)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2017, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day, The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2017, 10, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2017, 10, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2017, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2018, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Children's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 23)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2018, 9, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2018, 9, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2018, 9, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Chuseok")); - let date = NaiveDate::from_ymd_res(2018, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2019, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Children's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2019, 9, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2019, 9, 14)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2019, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 8, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative public holiday")); - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2020, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2020, 9, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2020, 10, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2020, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 19)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2021, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 16)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Liberation Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 20)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2021, 9, 21)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2021, 9, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2021, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of National Foundation Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Hangeul Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 31)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2022, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2022, 9, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2022, 9, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2022, 9, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Chuseok")); - let date = NaiveDate::from_ymd_res(2022, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Hangeul Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 21)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 23)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 27)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2023, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2023, 9, 29)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2023, 9, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2023, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Children's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 16)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2024, 9, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2024, 9, 18)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2024, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 30)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha, Children's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Children's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2025, 10, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2025, 10, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2025, 10, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Chuseok")); - let date = NaiveDate::from_ymd_res(2025, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2026, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 17)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Liberation Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2026, 9, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2026, 9, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2026, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of National Foundation Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2027, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 16)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Liberation Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 14)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2027, 9, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2027, 9, 16)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2027, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of National Foundation Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Hangeul Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 27)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 28)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2028, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok, National Foundation Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2028, 10, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of National Foundation Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2029, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 7)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Children's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 21)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2029, 9, 22)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2029, 9, 23)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2029, 9, 24)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Chuseok")); - let date = NaiveDate::from_ymd_res(2029, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 2)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Lunar New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Independence Movement Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Birthday of the Buddha")); - let date = NaiveDate::from_ymd_res(2030, 5, 5)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Alternative holiday of Children's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 6)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Liberation Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 11)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The day preceding of Chuseok")); - let date = NaiveDate::from_ymd_res(2030, 9, 12)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Chuseok")); - let date = NaiveDate::from_ymd_res(2030, 9, 13)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "The second day of Chuseok")); - let date = NaiveDate::from_ymd_res(2030, 10, 3)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "National Foundation Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 9)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Hangeul Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::KR, "South Korea", date, "Christmas Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Spain. -#[cfg(feature = "ES")] -pub mod es { -use super::*; - -/// Generate holiday map for Spain. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2000, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2000, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2000, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2001, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2001, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2001, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2001, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor (Trasladado)")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2002, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2002, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2002, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2002, 12, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción (Trasladado)")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2003, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2003, 10, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad (Trasladado)")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2003, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2004, 8, 16)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen (Trasladado)")); - let date = NaiveDate::from_ymd_res(2004, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2004, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2004, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador (Trasladado)")); - let date = NaiveDate::from_ymd_res(2005, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2005, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2005, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2005, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad (Trasladado)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo (Trasladado)")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2006, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2006, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2006, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2007, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2007, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2007, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2007, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor (Trasladado)")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2008, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2008, 10, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad (Trasladado)")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2008, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2009, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2009, 11, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos (Trasladado)")); - let date = NaiveDate::from_ymd_res(2009, 12, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española (Trasladado)")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2010, 8, 16)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen (Trasladado)")); - let date = NaiveDate::from_ymd_res(2010, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2010, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2010, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador (Trasladado)")); - let date = NaiveDate::from_ymd_res(2011, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2011, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2011, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2011, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad (Trasladado)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo (Trasladado)")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2012, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2012, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2012, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2012, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor (Trasladado)")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2013, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2013, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2013, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2013, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2013, 12, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción (Trasladado)")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2014, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2014, 10, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad (Trasladado)")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2014, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2015, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2015, 11, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos (Trasladado)")); - let date = NaiveDate::from_ymd_res(2015, 12, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española (Trasladado)")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador (Trasladado)")); - let date = NaiveDate::from_ymd_res(2016, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2016, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2016, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2016, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad (Trasladado)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo (Trasladado)")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2017, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2017, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2017, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2018, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2018, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2018, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2018, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor (Trasladado)")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2019, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2019, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2019, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2019, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2019, 12, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción (Trasladado)")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2020, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos (Trasladado)")); - let date = NaiveDate::from_ymd_res(2020, 12, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española (Trasladado)")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2021, 8, 16)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen (Trasladado)")); - let date = NaiveDate::from_ymd_res(2021, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2021, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2021, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2022, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2022, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2022, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2022, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad (Trasladado)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo (Trasladado)")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2023, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2023, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2023, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2024, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2024, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2024, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2024, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2024, 12, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción (Trasladado)")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2025, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2025, 10, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad (Trasladado)")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2025, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2026, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos (Trasladado)")); - let date = NaiveDate::from_ymd_res(2026, 12, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española (Trasladado)")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2027, 8, 16)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen (Trasladado)")); - let date = NaiveDate::from_ymd_res(2027, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2027, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2027, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2028, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2028, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2028, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2029, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2029, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2029, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2029, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Año nuevo")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Epifanía del Señor (Trasladado)")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Jueves Santo")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Viernes Santo")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día del Trabajador")); - let date = NaiveDate::from_ymd_res(2030, 8, 15)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Asunción de la Virgen")); - let date = NaiveDate::from_ymd_res(2030, 10, 12)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Hispanidad")); - let date = NaiveDate::from_ymd_res(2030, 11, 1)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Todos los Santos")); - let date = NaiveDate::from_ymd_res(2030, 12, 6)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Día de la Constitución Española")); - let date = NaiveDate::from_ymd_res(2030, 12, 9)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "La Inmaculada Concepción (Trasladado)")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::ES, "Spain", date, "Navidad")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Swaziland. -#[cfg(feature = "SZ")] -pub mod sz { -use super::*; - -/// Generate holiday map for Swaziland. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Y2K changeover")); - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2000, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2001, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2002, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2004, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2004, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2005, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2006, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2006, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2007, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day, Worker's Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2008, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2008, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2010, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday, National Flag Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2011, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2012, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2013, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2015, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2016, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2017, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2018, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday, King's Birthday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2020, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2021, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2022, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2023, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2024, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2026, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 20)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 9, 7)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2027, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2028, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2029, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "King's Birthday")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 23)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza (Observed)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Good Friday, King's Birthday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Ascension Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "National Flag Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 22)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Birthday of Late King Sobhuza")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Worker's Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 6)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::SZ, "Swaziland", date, "Boxing Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Sweden. -#[cfg(feature = "SE")] -pub mod se { -use super::*; - -/// Generate holiday map for Sweden. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 1, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 1, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 1, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 2, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 2, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 2, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 3, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 3, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 3, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 3, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 4, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 5, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 5, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 5, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 5, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 6, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2000, 6, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 7, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 7, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 7, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 7, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 7, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 8, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 8, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 8, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 8, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 9, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 9, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 9, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 9, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 10, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 10, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 10, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 10, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 10, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 11, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 11, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 11, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 12, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 12, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 12, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton, Söndag")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton, Söndag")); - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag pingst")); - let date = NaiveDate::from_ymd_res(2000, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2000, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2000, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 1, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 1, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 1, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 2, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 2, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 2, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 2, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 3, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 3, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 3, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 3, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 4, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2001, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 4, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 5, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 5, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 5, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 5, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2001, 6, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 6, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 7, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 7, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 7, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 7, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 7, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 8, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 8, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 8, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 8, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 9, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 9, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 9, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 9, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 9, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 10, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 10, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 10, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 10, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 11, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 11, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 11, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 12, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 12, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 12, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 12, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag pingst")); - let date = NaiveDate::from_ymd_res(2001, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2001, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2001, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag, Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2002, 1, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 1, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 1, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 2, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 2, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 2, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 3, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 3, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 3, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 3, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2002, 4, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 4, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 5, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2002, 5, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 6, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 6, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 6, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 6, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 7, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 7, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 7, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 7, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 8, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 8, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 8, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 8, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 9, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 9, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 9, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 9, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 9, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 10, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 10, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 10, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 10, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 11, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 11, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 11, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 12, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 12, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 12, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 12, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag pingst")); - let date = NaiveDate::from_ymd_res(2002, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2002, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2002, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 1, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 1, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 1, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 2, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 2, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 2, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 3, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 3, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 3, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 3, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 3, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 4, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 5, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 5, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 5, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 5, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 6, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2003, 6, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 6, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 7, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 7, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 7, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 7, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 8, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 8, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 8, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 8, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 8, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 9, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 9, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 9, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 9, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 10, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 10, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 10, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 11, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 11, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 11, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 11, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 12, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 12, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 12, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 12, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag pingst")); - let date = NaiveDate::from_ymd_res(2003, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2003, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2003, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 1, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 1, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 1, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 2, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 2, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 2, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 2, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 3, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 3, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 3, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 3, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 4, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2004, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 4, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 5, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 5, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2004, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 6, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 6, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 7, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 7, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 7, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 7, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 8, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 8, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 8, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 8, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 8, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 9, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 9, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 9, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 9, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 10, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 10, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 10, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 10, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 11, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 11, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 11, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 12, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 12, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 12, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul, Söndag")); - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag pingst")); - let date = NaiveDate::from_ymd_res(2004, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2004, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2004, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 1, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 1, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 1, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 1, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 2, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 2, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 2, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 2, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 3, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 3, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 3, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2005, 4, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 4, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 4, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 4, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj, Söndag")); - let date = NaiveDate::from_ymd_res(2005, 5, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2005, 5, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 5, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 6, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 6, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 7, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 7, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 7, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 7, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 7, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 8, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 8, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 8, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 8, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 9, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 9, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 9, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 9, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 10, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 10, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 10, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 10, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 10, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 11, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 11, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 11, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 12, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 12, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 12, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen, Söndag")); - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2005, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2005, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2005, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2006, 1, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 1, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 1, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 2, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 2, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 2, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 2, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 3, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 3, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 3, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 3, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 4, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 5, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 5, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 5, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 5, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2006, 6, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 6, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 7, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 7, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 7, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 7, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 7, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 8, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 8, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 8, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 8, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 9, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 9, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 9, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 9, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 10, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 10, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 10, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 10, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 10, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 11, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 11, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 11, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 12, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 12, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 12, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton, Söndag")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton, Söndag")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2006, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2006, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2006, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2006, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 1, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 1, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 1, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 2, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 2, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 2, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 3, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 3, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 3, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 3, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2007, 4, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 4, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 5, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 5, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 5, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2007, 6, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 6, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 6, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 7, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 7, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 7, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 7, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 7, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 8, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 8, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 8, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 8, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 9, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 9, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 9, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 9, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 9, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 10, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 10, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 10, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 11, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 11, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 11, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 12, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 12, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 12, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 12, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 12, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2007, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2007, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2007, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2007, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag, Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2008, 1, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 1, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 1, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 2, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 2, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 2, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 2, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 3, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 3, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 3, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2008, 3, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 4, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 4, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 5, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2008, 5, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 5, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 6, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 6, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 6, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 6, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 7, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 7, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 7, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 7, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 8, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 8, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 8, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 8, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 8, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 9, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 9, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 9, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 9, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 10, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 10, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 10, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 10, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 11, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 11, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 11, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 11, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 12, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 12, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 12, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 12, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj, Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2008, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2008, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2008, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2008, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 1, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 1, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 1, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 2, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 2, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 2, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 2, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 3, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 3, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 3, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 4, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 4, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 5, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 5, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 5, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 5, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2009, 6, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 6, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 6, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 7, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 7, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 7, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 7, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 8, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 8, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 8, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 8, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 8, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 9, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 9, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 9, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 10, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 10, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 10, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 10, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 11, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 11, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 11, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 11, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 12, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 12, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 12, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 12, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2009, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2009, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2009, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2009, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 1, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 1, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 1, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 1, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 2, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 2, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 2, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 3, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 3, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 3, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2010, 4, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 4, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 5, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 5, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2010, 5, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag, Söndag")); - let date = NaiveDate::from_ymd_res(2010, 6, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 6, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 7, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 7, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 7, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 7, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 8, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 8, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 8, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 8, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 8, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 9, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 9, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 9, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 9, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 10, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 10, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 10, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 10, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 11, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 11, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 11, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 11, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 12, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 12, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 12, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul, Söndag")); - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2010, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2010, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2010, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 1, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 1, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 1, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 1, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 2, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 2, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 2, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 2, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 3, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 3, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 3, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 3, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 4, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 4, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 4, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj, Söndag")); - let date = NaiveDate::from_ymd_res(2011, 5, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 5, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 5, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 5, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 6, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2011, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 7, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 7, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 7, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 7, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 7, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 8, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 8, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 8, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 8, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 9, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 9, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 9, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 9, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 10, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 10, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 10, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 10, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 10, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 11, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 11, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 11, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 12, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 12, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 12, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen, Söndag")); - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2011, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2011, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2011, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2012, 1, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 1, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 1, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 1, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 2, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 2, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 2, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 2, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 3, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 3, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 3, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 3, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 4, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 5, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 5, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 5, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2012, 6, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 6, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 7, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 7, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 7, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 7, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 7, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 8, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 8, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 8, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 9, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 9, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 9, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 9, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 9, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 10, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 10, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 10, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 11, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 11, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 11, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 12, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 12, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 12, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 12, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 12, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2012, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2012, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2012, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag, Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2013, 1, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 1, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 1, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 2, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 2, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 2, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 3, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 3, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 3, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 3, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2013, 4, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 4, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 5, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2013, 5, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 6, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 6, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 6, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 6, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 7, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 7, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 7, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 7, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 8, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 8, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 8, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 8, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 9, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 9, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 9, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 9, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 9, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 10, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 10, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 10, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 10, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 11, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 11, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 11, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 12, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 12, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 12, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 12, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2013, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2013, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2013, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 1, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 1, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 1, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 2, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 2, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 2, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 2, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 3, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 3, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 3, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 3, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 3, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 4, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2014, 4, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 5, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 5, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 5, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 5, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 6, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2014, 6, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 6, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 7, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 7, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 7, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 7, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 8, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 8, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 8, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 8, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 8, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 9, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 9, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 9, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 9, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 10, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 10, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 11, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 11, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 11, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 11, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 12, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 12, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 12, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 12, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2014, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2014, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2014, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2014, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 1, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 1, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 1, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 2, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 2, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 2, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 2, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 3, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 3, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 3, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 4, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 4, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 5, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 5, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 5, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2015, 5, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 6, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 6, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 6, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 7, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 7, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 7, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 8, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 8, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 8, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 8, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 8, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 9, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 9, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 9, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 9, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 10, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 10, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 10, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 10, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 11, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 11, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 11, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 11, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 12, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 12, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 12, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 12, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2015, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2015, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2015, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2015, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 1, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 1, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 1, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 1, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 2, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 2, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 2, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 2, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 3, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 3, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 3, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2016, 4, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 4, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 4, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 4, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj, Söndag")); - let date = NaiveDate::from_ymd_res(2016, 5, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2016, 5, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 5, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 6, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 6, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 7, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 7, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 7, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 7, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 7, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 8, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 8, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 8, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 8, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 9, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 9, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 9, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 10, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 10, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 10, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 10, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 11, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 11, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 11, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 12, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 12, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen, Söndag")); - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2016, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2016, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2016, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2016, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2017, 1, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 1, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 1, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 1, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 2, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 2, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 2, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 2, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 3, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 3, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 3, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 3, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2017, 4, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 4, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 5, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 5, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 5, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 5, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2017, 6, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 6, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 7, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 7, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 7, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 7, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 7, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 8, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 8, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 8, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 8, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 9, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 9, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 9, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 9, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 10, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 10, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 10, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 10, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 10, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 11, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 11, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 11, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 12, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 12, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 12, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton, Söndag")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton, Söndag")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2017, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2017, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2017, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2017, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 1, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 1, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 1, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 2, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 2, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 2, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 2, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 3, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 3, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 3, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 3, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 4, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 4, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 5, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 5, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2018, 5, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 6, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 6, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 7, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 7, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 7, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 7, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 7, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 8, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 8, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 8, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 8, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 9, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 9, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 9, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 9, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 9, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 10, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 10, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 10, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 10, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 11, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 11, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 11, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 12, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 12, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 12, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 12, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 12, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2018, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2018, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2018, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2018, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag, Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2019, 1, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 1, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 1, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 2, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 2, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 2, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 2, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 3, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 3, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 3, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 3, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 3, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 4, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 5, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 5, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 5, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 5, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 6, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2019, 6, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 6, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 7, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 7, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 7, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 7, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 8, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 8, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 8, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 9, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 9, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 9, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 9, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 9, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 10, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 10, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 10, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 10, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 11, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 11, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 11, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 12, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 12, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 12, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 12, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2019, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2019, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2019, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 1, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 1, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 2, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 2, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 2, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 2, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 3, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 3, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 3, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 4, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 4, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 5, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 5, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 5, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2020, 6, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 6, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 6, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 7, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 7, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 7, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 7, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 8, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 8, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 8, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 8, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 9, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 9, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 9, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 9, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 10, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 10, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 10, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 10, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 11, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 11, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 11, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 11, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 12, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 12, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 12, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 12, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2020, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2020, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2020, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2020, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 1, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 1, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 1, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 1, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 2, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 2, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 2, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 2, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 3, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 3, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 3, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 3, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2021, 4, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 4, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 5, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2021, 5, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag, Söndag")); - let date = NaiveDate::from_ymd_res(2021, 6, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 6, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 7, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 7, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 7, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 7, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 8, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 8, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 8, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 8, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 8, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 9, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 9, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 9, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 9, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 10, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 10, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 10, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 10, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 11, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 11, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 11, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 11, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 12, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 12, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 12, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul, Söndag")); - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2021, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2021, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2021, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 1, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 1, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 1, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 1, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 2, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 2, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 2, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 2, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 3, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 3, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 3, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 3, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 4, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 4, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj, Söndag")); - let date = NaiveDate::from_ymd_res(2022, 5, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 5, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 5, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 5, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2022, 6, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 7, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 7, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 7, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 7, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 8, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 8, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 8, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 8, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 9, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 9, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 9, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 9, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 10, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 10, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 10, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 10, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 10, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 11, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 11, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 11, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 12, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 12, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 12, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen, Söndag")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2022, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2022, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2022, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2023, 1, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 1, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 1, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 2, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 2, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 2, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 2, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 3, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 3, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 3, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 3, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 4, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 5, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 5, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 5, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2023, 6, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 6, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 6, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 7, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 7, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 7, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 7, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 7, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 8, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 8, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 8, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 8, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 9, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 9, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 9, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 9, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 10, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 10, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 10, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 10, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 10, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 11, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 11, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 11, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 12, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 12, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 12, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton, Söndag")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton, Söndag")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2023, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2023, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2023, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2023, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 1, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 1, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 1, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 2, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 2, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 2, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 3, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 3, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 3, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 3, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2024, 4, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 4, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 5, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2024, 5, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 6, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 6, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 6, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 7, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 7, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 7, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 8, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 8, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 8, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 8, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 9, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 9, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 9, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 9, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 10, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 10, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 10, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 10, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 11, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 11, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 11, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 12, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 12, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 12, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 12, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2024, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2024, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2024, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2024, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 1, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 1, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 1, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 2, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 2, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 2, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 2, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 3, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 3, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 3, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 3, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 4, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2025, 4, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 5, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 5, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 5, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 5, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 6, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2025, 6, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 6, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 7, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 7, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 7, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 7, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 8, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 8, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 8, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 8, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 8, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 9, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 9, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 9, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 9, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 10, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 10, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 10, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 10, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 11, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 11, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 11, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 11, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 12, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 12, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 12, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 12, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2025, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2025, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2025, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 1, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 1, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 1, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 2, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 2, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 2, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 2, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 3, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 3, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 4, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 4, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 5, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 5, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 5, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2026, 5, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 6, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 6, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 6, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 7, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 7, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 7, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 7, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 8, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 8, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 8, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 8, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 8, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 9, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 9, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 9, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 9, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 10, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 10, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 10, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 10, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 11, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 11, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 11, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 11, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 11, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 12, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 12, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 12, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 12, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2026, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2026, 6, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2026, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2026, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 1, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 1, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 1, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 1, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 2, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 2, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 2, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 2, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 3, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 3, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2027, 4, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 4, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 4, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 4, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2027, 5, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 5, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag, Söndag")); - let date = NaiveDate::from_ymd_res(2027, 6, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 6, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 6, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 7, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 7, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 7, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 7, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 8, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 8, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 8, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 8, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 8, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 9, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 9, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 9, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 9, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 10, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 10, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 10, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 10, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 10, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 11, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 11, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 11, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 11, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 12, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 12, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 12, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul, Söndag")); - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2027, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2027, 6, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2027, 11, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 1, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 1, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 1, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 1, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 2, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 2, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 2, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 3, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 3, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 3, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 3, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 4, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2028, 4, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 4, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 5, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 5, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 5, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2028, 6, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 6, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 6, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 7, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 7, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 7, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 7, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 7, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 8, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 8, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 8, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 8, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 9, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 9, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 9, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 9, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 10, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 10, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 10, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 10, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 10, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 11, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 11, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 11, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 11, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 12, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 12, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 12, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton, Söndag")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton, Söndag")); - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2028, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2028, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2028, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2028, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 1, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 1, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 1, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 2, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 2, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 2, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 2, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 3, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 3, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 3, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 3, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 4, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 4, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 5, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 5, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2029, 5, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 6, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 6, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 6, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 6, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 7, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 7, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 7, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 7, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 7, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 8, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 8, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 8, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 8, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 9, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 9, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 9, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 9, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 9, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 10, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 10, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 10, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 10, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 11, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 11, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 11, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 11, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 12, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 12, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 12, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 12, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 12, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2029, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2029, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2029, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2029, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag, Trettondedag jul")); - let date = NaiveDate::from_ymd_res(2030, 1, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 1, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 1, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 2, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 2, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 2, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 3, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 3, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 3, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 3, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 3, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 4, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Påskdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 5, 5)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 5, 12)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 5, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 5, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 6, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Pingstdagen, Söndag")); - let date = NaiveDate::from_ymd_res(2030, 6, 16)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 6, 23)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 6, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 7, 7)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 7, 14)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 7, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 7, 28)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 8, 4)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 8, 11)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 8, 18)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 8, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 9, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 9, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 9, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 9, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 9, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 10, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 10, 13)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 10, 20)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 10, 27)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 11, 3)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 11, 10)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 11, 17)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 11, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 12, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 12, 15)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 12, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 12, 29)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Söndag")); - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsdagen")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Första maj")); - let date = NaiveDate::from_ymd_res(2030, 6, 6)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Sveriges nationaldag")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Julafton")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Juldagen")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag jul")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Nyårsafton")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Långfredagen")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Annandag påsk")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Kristi himmelsfärdsdag")); - let date = NaiveDate::from_ymd_res(2030, 6, 21)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommarafton")); - let date = NaiveDate::from_ymd_res(2030, 6, 22)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Midsommardagen")); - let date = NaiveDate::from_ymd_res(2030, 11, 2)?; - m.insert(date, Holiday::new(Country::SE, "Sweden", date, "Alla helgons dag")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Switzerland. -#[cfg(feature = "CH")] -pub mod ch { -use super::*; - -/// Generate holiday map for Switzerland. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2000, 6, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2000, 6, 11)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2000, 6, 12)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2000, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2001, 5, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2001, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2002, 5, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2002, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2003, 5, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2003, 6, 8)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2003, 6, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2003, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2004, 5, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2004, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2005, 5, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2005, 5, 15)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2006, 6, 4)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2006, 6, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2006, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2007, 5, 17)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2007, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2008, 5, 11)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2008, 5, 12)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2008, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2009, 5, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2009, 5, 31)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2009, 6, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2009, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2010, 5, 13)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2010, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2011, 6, 2)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2012, 5, 17)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2012, 5, 27)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2012, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2013, 5, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2013, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2014, 5, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2014, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2015, 5, 14)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2015, 5, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2015, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2016, 5, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2016, 5, 15)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2017, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2018, 5, 10)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2018, 5, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2018, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2019, 5, 30)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2019, 6, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2019, 6, 10)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2019, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2020, 5, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2020, 5, 31)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2020, 6, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2021, 5, 23)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2021, 5, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2021, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2022, 5, 26)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2022, 6, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2022, 6, 6)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2023, 5, 18)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2023, 5, 28)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2023, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2024, 5, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2024, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2025, 5, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2025, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2026, 5, 14)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2026, 5, 24)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2026, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2027, 5, 6)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2027, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2028, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2029, 5, 10)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2029, 5, 20)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2029, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Neujahrestag")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostern")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Karfreitag")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Ostermontag")); - let date = NaiveDate::from_ymd_res(2030, 5, 30)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Auffahrt")); - let date = NaiveDate::from_ymd_res(2030, 6, 9)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingsten")); - let date = NaiveDate::from_ymd_res(2030, 6, 10)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Pfingstmontag")); - let date = NaiveDate::from_ymd_res(2030, 8, 1)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Nationalfeiertag")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::CH, "Switzerland", date, "Weihnachten")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Taiwan. -#[cfg(feature = "TW")] -pub mod tw { -use super::*; - -/// Generate holiday map for Taiwan. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2000, 2, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2000, 2, 7)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2000, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2000, 6, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2000, 9, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2000, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2001, 1, 23)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2001, 1, 26)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2001, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2001, 6, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2001, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2002, 2, 14)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2002, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2002, 6, 15)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2002, 9, 21)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2002, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2003, 1, 31)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2003, 2, 3)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2003, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2003, 6, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2003, 9, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2003, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2004, 1, 21)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2004, 1, 23)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2004, 1, 24)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2004, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2004, 6, 22)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2004, 9, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2004, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2005, 2, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2005, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2005, 6, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2005, 9, 18)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2006, 1, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2006, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 31)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2006, 10, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2006, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2007, 2, 17)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2007, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2007, 6, 19)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2007, 9, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2007, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2008, 2, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2008, 2, 9)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2008, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2008, 6, 8)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2008, 9, 14)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2008, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2009, 1, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2009, 1, 27)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2009, 1, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2009, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2009, 10, 3)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2009, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2009, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2010, 2, 13)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2010, 6, 16)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2010, 9, 22)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2010, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2011, 2, 2)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2011, 2, 5)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2011, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2011, 6, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2011, 9, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2012, 1, 22)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2012, 1, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2012, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 23)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2012, 9, 30)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2012, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2013, 2, 9)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2013, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2013, 6, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2013, 9, 19)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2013, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2014, 1, 30)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2014, 2, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2014, 2, 2)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2014, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2014, 6, 2)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2014, 9, 8)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2014, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2015, 2, 18)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2015, 2, 20)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2015, 2, 21)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2015, 6, 20)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2015, 9, 27)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2015, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2016, 2, 7)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2016, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2016, 6, 9)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2016, 9, 15)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2017, 1, 27)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2017, 1, 29)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2017, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 30)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2017, 10, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2017, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2018, 2, 15)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2018, 2, 17)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2018, 2, 18)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2018, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 18)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2018, 9, 24)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2018, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2019, 2, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2019, 2, 7)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2019, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 7)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2019, 9, 13)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2019, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2020, 1, 24)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2020, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2020, 6, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2020, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2020, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2021, 2, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2021, 2, 13)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2021, 2, 14)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 14)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2021, 9, 21)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2021, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2022, 1, 31)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2022, 2, 3)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2022, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 3)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2022, 9, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2023, 1, 21)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2023, 1, 23)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2023, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 22)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2023, 9, 29)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2023, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2024, 2, 9)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2024, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2024, 9, 17)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2024, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2025, 1, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2025, 1, 30)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2025, 1, 31)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2025, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 31)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2025, 10, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2025, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2026, 2, 19)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 19)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2026, 9, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2026, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2027, 2, 5)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2027, 2, 7)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2027, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 9)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2027, 9, 15)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2027, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2028, 1, 25)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2028, 1, 27)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2028, 1, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2028, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2028, 10, 3)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2028, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2029, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 16)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2029, 9, 22)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2029, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Founding of the Republic of China (New Year's Day)")); - let date = NaiveDate::from_ymd_res(2030, 2, 2)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Chinese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Spring Festival")); - let date = NaiveDate::from_ymd_res(2030, 4, 4)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Children's Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 5)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Dragon Boat Festival")); - let date = NaiveDate::from_ymd_res(2030, 9, 12)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Mid-Autumn Festival")); - let date = NaiveDate::from_ymd_res(2030, 10, 10)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 11)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 28)?; - m.insert(date, Holiday::new(Country::TW, "Taiwan", date, "Peace Memorial Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Turkey. -#[cfg(feature = "TR")] -pub mod tr { -use super::*; - -/// Generate holiday map for Turkey. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 18)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 18)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 7)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 25)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 13)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2004, 11, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 3)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 4)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 24)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 12)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 13)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day, Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2007, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 3)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 12)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast, Victory Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 9)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day, Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 18)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 7)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 26)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 3)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 24)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 12)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day, Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2023, 7, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 12)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Sacrifice Feast Holiday, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 8)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 26)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 27)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 23)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "National Sovereignty and Children's Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 19)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Commemoration of Ataturk, Youth and Sports Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Democracy and National Unity Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 30)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Victory Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 29)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Ramadan Feast Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 16)?; - m.insert(date, Holiday::new(Country::TR, "Turkey", date, "Sacrifice Feast Holiday")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Tunisia. -#[cfg(feature = "TN")] -pub mod tn { -use super::*; - -/// Generate holiday map for Tunisia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2000, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 12, 29)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 3, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2001, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2002, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2003, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2004, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day, Prophet Muhammad's Birthday")); - let date = NaiveDate::from_ymd_res(2004, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 11, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2004, 1, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2004, 2, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2005, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 1, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2006, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 12)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2006, 12, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2006, 4, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday, New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2007, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday, Evacuation Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 19)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 12, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day, Prophet Muhammad's Birthday")); - let date = NaiveDate::from_ymd_res(2008, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 12, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2008, 1, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2009, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 11, 29)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2010, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 12)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2010, 12, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2011, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2011, 11, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2012, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2012, 2, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2013, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha, Evacuation Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 10, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2014, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2014, 10, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2014, 1, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2015, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - let date = NaiveDate::from_ymd_res(2015, 12, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2016, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2017, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 8, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2018, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2018, 11, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2019, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday, Women's Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2020, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 7, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2020, 10, 29)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2021, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 19)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2022, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2022, 7, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2022, 10, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2023, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 6, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2023, 9, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2024, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 12)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2024, 9, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2025, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2025, 9, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr, Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 5, 29)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2027, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2027, 8, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2028, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2028, 8, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2029, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2029, 4, 26)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Revolution and Youth Day - January 14")); - let date = NaiveDate::from_ymd_res(2030, 3, 20)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 9)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Martyrs' Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 25)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Republic Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Evacuation Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 12)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Arafat Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Islamic New Year")); - let date = NaiveDate::from_ymd_res(2030, 7, 13)?; - m.insert(date, Holiday::new(Country::TN, "Tunisia", date, "Prophet Muhammad's Birthday")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Ukraine. -#[cfg(feature = "UA")] -pub mod ua { -use super::*; - -/// Generate holiday map for Ukraine. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2000, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2000, 6, 18)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2000, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2000, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2000, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2000, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2000, 6, 19)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2001, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2001, 6, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2001, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2001, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2001, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2001, 1, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2002, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2002, 5, 5)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2002, 6, 23)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2002, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2002, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2002, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2002, 6, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2002, 8, 26)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2003, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2003, 4, 27)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2003, 6, 15)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2003, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2003, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2003, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2003, 3, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2003, 4, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2003, 6, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2003, 6, 30)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - let date = NaiveDate::from_ymd_res(2003, 8, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2004, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2004, 5, 30)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2004, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2004, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2004, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2004, 5, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2004, 5, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2005, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха), День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2005, 6, 19)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2005, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2005, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха), День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2005, 6, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2006, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2006, 4, 23)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2006, 6, 11)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2006, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2006, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2006, 4, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2006, 6, 12)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2007, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2007, 5, 27)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2007, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2007, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2007, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2007, 1, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2008, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2008, 4, 27)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2008, 6, 15)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2008, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2008, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2008, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2008, 3, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2008, 4, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2008, 6, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2008, 6, 30)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - let date = NaiveDate::from_ymd_res(2008, 8, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2009, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2009, 6, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2009, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2009, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2009, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2009, 4, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2009, 6, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2009, 5, 11)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги")); - let date = NaiveDate::from_ymd_res(2009, 6, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2010, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2010, 5, 23)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2010, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2010, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2010, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2010, 5, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2010, 5, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2010, 5, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2011, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2011, 6, 12)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2011, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2011, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2011, 6, 13)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День міжнародної солідарності трудящих")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2012, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2012, 4, 15)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2012, 6, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2012, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2012, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2012, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2012, 1, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2012, 4, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2013, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2013, 5, 5)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2013, 6, 23)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2013, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2013, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2013, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2013, 8, 26)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2014, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2014, 6, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2014, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2014, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2014, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2014, 3, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2014, 6, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2014, 6, 30)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - let date = NaiveDate::from_ymd_res(2014, 8, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2015, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2015, 4, 12)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2015, 5, 31)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2015, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги")); - let date = NaiveDate::from_ymd_res(2015, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2015, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисника України")); - let date = NaiveDate::from_ymd_res(2015, 3, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2015, 4, 13)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2015, 6, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2015, 5, 11)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги")); - let date = NaiveDate::from_ymd_res(2015, 6, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2016, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха), День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2016, 6, 19)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2016, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2016, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2016, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисника України")); - let date = NaiveDate::from_ymd_res(2016, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха), День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2016, 6, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2017, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2017, 6, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2017, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День міжнародної солідарності трудящих")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2017, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2017, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2017, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисника України")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2017, 1, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2017, 6, 5)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2017, 10, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День захисника України")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2018, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2018, 4, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2018, 5, 27)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2018, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2018, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2018, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисника України")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2018, 1, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2018, 4, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2018, 10, 15)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День захисника України")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2019, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2019, 4, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2019, 6, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2019, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2019, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисника України")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2019, 4, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2019, 6, 17)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2019, 8, 26)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2020, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2020, 6, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2020, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2020, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2020, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисника України")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2020, 3, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2020, 4, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2020, 6, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2020, 5, 11)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2020, 6, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2021, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2021, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2021, 6, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2021, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2021, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2021, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2021, 6, 21)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2021, 5, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День праці")); - let date = NaiveDate::from_ymd_res(2021, 5, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за григоріанським календарем)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2022, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2022, 4, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2022, 6, 12)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2022, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2022, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2022, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2022, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2022, 4, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2022, 6, 13)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День праці")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за григоріанським календарем)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2023, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2023, 4, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2023, 6, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2023, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2023, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2023, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2023, 1, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2023, 6, 5)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2023, 10, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День захисників і захисниць України")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2024, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2024, 5, 5)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2024, 6, 23)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2024, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2024, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2024, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2024, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2024, 1, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2024, 7, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Української Державності")); - let date = NaiveDate::from_ymd_res(2024, 8, 26)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2025, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2025, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2025, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2025, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2025, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2025, 3, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2025, 6, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2025, 6, 30)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - let date = NaiveDate::from_ymd_res(2025, 8, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2026, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2026, 4, 12)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2026, 5, 31)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2026, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2026, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2026, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2026, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2026, 3, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2026, 4, 13)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2026, 6, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2026, 5, 11)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2026, 6, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Конституції України")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2027, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2027, 5, 2)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2027, 6, 20)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2027, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2027, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2027, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2027, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2027, 6, 21)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2027, 5, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День праці")); - let date = NaiveDate::from_ymd_res(2027, 5, 10)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за григоріанським календарем)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2028, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2028, 6, 4)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2028, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2028, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2028, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2028, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Новий рік")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2028, 6, 5)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2028, 10, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День захисників і захисниць України")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2029, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2029, 4, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2029, 5, 27)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2029, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2029, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2029, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2029, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2029, 1, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2029, 4, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2029, 7, 30)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Української Державності")); - let date = NaiveDate::from_ymd_res(2029, 10, 15)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День захисників і захисниць України")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Новий рік")); - let date = NaiveDate::from_ymd_res(2030, 1, 7)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за юліанським календарем)")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Міжнародний жіночий день")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2030, 6, 16)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Трійця")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День праці")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День перемоги над нацизмом у Другій світовій війні (День перемоги)")); - let date = NaiveDate::from_ymd_res(2030, 6, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Конституції України")); - let date = NaiveDate::from_ymd_res(2030, 7, 28)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День Української Державності")); - let date = NaiveDate::from_ymd_res(2030, 8, 24)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День незалежності України")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "День захисників і захисниць України")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Різдво Христове (за григоріанським календарем)")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Великдень (Пасха)")); - let date = NaiveDate::from_ymd_res(2030, 6, 17)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за Трійця")); - let date = NaiveDate::from_ymd_res(2030, 7, 29)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День Української Державності")); - let date = NaiveDate::from_ymd_res(2030, 8, 26)?; - m.insert(date, Holiday::new(Country::UA, "Ukraine", date, "Вихідний за День незалежності України")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// United Arab Emirates. -#[cfg(feature = "AE")] -pub mod ae { -use super::*; - -/// Generate holiday map for United Arab Emirates. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 1, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 28)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 12, 29)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 3, 18)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 4, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 10, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2000, 6, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 12, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 12, 18)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 3, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 10, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2001, 6, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 12, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 12, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 2, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 3, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 10, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2002, 5, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 11, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 2, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 9, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2003, 5, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 11, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 11, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 1, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 2, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 9, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 11, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 11, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 1, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 1, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 1, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 9, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2005, 4, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 10, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 12, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 8, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2006, 4, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated), New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 10, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 12, 19)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 12, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 12, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 1, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 8, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2007, 3, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 10, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 10, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 12, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 12, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 12, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 1, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 7, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 9, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 9, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 11, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 11, 28)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 11, 29)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 12, 18)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 7, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 9, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 9, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 11, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 11, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 11, 18)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 12, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 7, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2010, 2, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 8, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 11, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 11, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 11, 8)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 11, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 6, 29)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2011, 2, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 8, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 8, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 10, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 10, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 10, 28)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 11, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 6, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2012, 2, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 8, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 8, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 10, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 10, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 11, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 6, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2013, 1, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 7, 29)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 7, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 10, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 10, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 10, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 10, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2014, 1, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 7, 19)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 9, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 9, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 9, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 10, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 5, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 1, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2015, 12, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 11, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 7, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 7, 8)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 9, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 9, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 10, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 5, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension* (*estimated)")); - let date = NaiveDate::from_ymd_res(2016, 12, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday* (*estimated)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day, Mawlud al-Nabi - Prophet Mohammad's Birthday")); - let date = NaiveDate::from_ymd_res(2017, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2017, 6, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 6, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2017, 8, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2017, 9, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year")); - let date = NaiveDate::from_ymd_res(2017, 4, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 6, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2018, 8, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2018, 9, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year")); - let date = NaiveDate::from_ymd_res(2018, 4, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Leilat al-Miraj - The Prophet's ascension")); - let date = NaiveDate::from_ymd_res(2018, 11, 19)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 6, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year")); - let date = NaiveDate::from_ymd_res(2019, 11, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Mawlud al-Nabi - Prophet Mohammad's Birthday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 5, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday")); - let date = NaiveDate::from_ymd_res(2020, 7, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha")); - let date = NaiveDate::from_ymd_res(2020, 8, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2021, 5, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2021, 5, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2021, 7, 19)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2021, 7, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2021, 7, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2022, 5, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2022, 7, 8)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2022, 7, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2022, 7, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2022, 7, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 4, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 4, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 29)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 6, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2023, 7, 19)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 4, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 6, 18)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2024, 7, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 3, 31)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 4, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 8)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2025, 6, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 3, 22)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 28)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 5, 29)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2026, 6, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 10)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 3, 11)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 5, 18)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2027, 6, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 27)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 7)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 25)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 4, 26)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2029, 5, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 1)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Commemoration Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 2)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "National Day Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Fitr Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 12)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Arafat (Hajj) Day* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 14)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha* Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 4, 15)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Eid al-Adha Holiday* (*estimated)")); - let date = NaiveDate::from_ymd_res(2030, 5, 3)?; - m.insert(date, Holiday::new(Country::AE, "United Arab Emirates", date, "Al Hijra - Islamic New Year* (*estimated)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// United Kingdom. -#[cfg(feature = "GB")] -pub mod gb { -use super::*; - -/// Generate holiday map for United Kingdom. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2000, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2000, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2000, 8, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2001, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 3, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2001, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 5, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2001, 8, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 6, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Golden Jubilee of Elizabeth II")); - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2002, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 3, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2002, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 8, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2002, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 5, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2002, 8, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2003, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 8, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2003, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 5, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2003, 8, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2004, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2004, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2004, 8, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2005, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2005, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2005, 8, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2006, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2006, 8, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2007, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 3, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2007, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 5, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2007, 8, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2008, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 8, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2008, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 5, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2008, 8, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2009, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 8, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2009, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 5, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2009, 8, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2010, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2010, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2010, 8, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 4, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Wedding of William and Catherine")); - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2011, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2011, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2011, 8, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 6, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Diamond Jubilee of Elizabeth II")); - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 3, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2012, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 5, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2012, 6, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2012, 8, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2013, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 3, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2013, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 8, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2013, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 5, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2013, 8, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2014, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 8, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2014, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 5, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2014, 8, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2015, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 8, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2015, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 5, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2015, 8, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2016, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2016, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2016, 8, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2017, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2017, 8, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2018, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 3, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2018, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 5, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2018, 8, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2019, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 3, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2019, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 8, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2019, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 5, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2019, 8, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2020, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2020, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 5, 8)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2020, 8, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2021, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2021, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2021, 8, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 6, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Platinum Jubilee of Elizabeth II")); - let date = NaiveDate::from_ymd_res(2022, 9, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "State Funeral of Queen Elizabeth II")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2022, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2022, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2022, 8, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 5, 8)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Coronation of Charles III")); - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland], New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2023, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2023, 8, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2024, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 3, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2024, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 8, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2024, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 5, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2024, 8, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2025, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 8, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2025, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 5, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2025, 8, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2026, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 8, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2026, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 5, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2026, 8, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2027, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2027, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 31)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2027, 8, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2028, 1, 4)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland] (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2028, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 29)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2028, 8, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2029, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 3, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2029, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 5, 7)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2029, 8, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 2)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "New Year Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2030, 3, 17)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 3, 18)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Patrick's Day [Northern Ireland] (Observed)")); - let date = NaiveDate::from_ymd_res(2030, 7, 12)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Battle of the Boyne [Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 8, 5)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Summer Bank Holiday [Scotland]")); - let date = NaiveDate::from_ymd_res(2030, 11, 30)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "St. Andrew's Day [Scotland]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Easter Monday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 5, 6)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "May Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 27)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Spring Bank Holiday")); - let date = NaiveDate::from_ymd_res(2030, 8, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Late Summer Bank Holiday [England/Wales/Northern Ireland]")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::GB, "United Kingdom", date, "Boxing Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// United States. -#[cfg(feature = "US")] -pub mod us { -use super::*; - -/// Generate holiday map for United States. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2000, 2, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2000, 5, 29)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 9)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2000, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2000, 11, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2000, 11, 23)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 1, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2001, 2, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2001, 5, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 8)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2001, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2001, 11, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2001, 11, 22)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 1, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2002, 5, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 14)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2002, 11, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2003, 5, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 13)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2003, 11, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 1, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2004, 5, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 9, 6)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2004, 11, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2005, 2, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2005, 5, 30)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2005, 11, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 1, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2006, 2, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2006, 5, 29)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 9, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 9)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2006, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2006, 11, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 11, 23)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 1, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2007, 5, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 8)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2007, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2007, 11, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2007, 11, 22)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 1, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 9, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 13)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2008, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2008, 11, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 1, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2009, 2, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2009, 9, 7)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 1, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2010, 5, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 9, 6)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2011, 2, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2011, 5, 30)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 1, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2012, 5, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 8)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2012, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2012, 11, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2012, 11, 22)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 1, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2013, 5, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 14)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2013, 11, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2014, 2, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 13)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2014, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2014, 11, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 1, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 9, 7)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2015, 11, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 1, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2016, 2, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2016, 5, 30)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2016, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2016, 11, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 1, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2017, 2, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2017, 5, 29)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 9)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2017, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2017, 11, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 11, 23)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 1, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2018, 5, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 8)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2018, 11, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2018, 11, 22)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 1, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2019, 5, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 14)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2019, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2019, 11, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2020, 2, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 9, 7)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2020, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2020, 11, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 1, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2021, 5, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 6, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 9, 6)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2021, 11, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2022, 5, 30)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 6, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2022, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2022, 11, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 1, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2023, 5, 29)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 9)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2023, 11, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 11, 23)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 1, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2024, 5, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 14)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2024, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2024, 11, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 20)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2025, 5, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 13)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2025, 11, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 1, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2026, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 9, 7)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2026, 11, 26)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 1, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2027, 5, 31)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 6, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 9, 6)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2027, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2027, 11, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 17)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2028, 5, 29)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2028, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 9)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2028, 11, 10)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2028, 11, 23)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 1, 15)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2029, 5, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2029, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 3)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 8)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2029, 11, 12)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day (Observed)")); - let date = NaiveDate::from_ymd_res(2029, 11, 22)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 1, 21)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Martin Luther King Jr. Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 18)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Washington's Birthday")); - let date = NaiveDate::from_ymd_res(2030, 5, 27)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2030, 6, 19)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Juneteenth National Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 4)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 2)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Labor Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 14)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Columbus Day")); - let date = NaiveDate::from_ymd_res(2030, 11, 11)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Veterans Day")); - let date = NaiveDate::from_ymd_res(2030, 11, 28)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Thanksgiving")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::US, "United States", date, "Christmas Day")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Uruguay. -#[cfg(feature = "UY")] -pub mod uy { -use super::*; - -/// Generate holiday map for Uruguay. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2000, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2000, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2000, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2000, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2000, 5, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2000, 10, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2001, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2001, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2001, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2001, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2001, 4, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2001, 5, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2001, 10, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2002, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2002, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2002, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 31)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2002, 4, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2002, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2002, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2003, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2003, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2003, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2003, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2004, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2004, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2004, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2004, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 11)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2004, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2004, 5, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2004, 10, 11)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2005, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2005, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2005, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2005, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2005, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 7)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 27)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2005, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2005, 5, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2005, 10, 10)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2006, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2006, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2006, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2006, 2, 27)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2006, 5, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2006, 10, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2007, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2007, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2007, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2007, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 8)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2007, 4, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2007, 5, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2007, 10, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2008, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2008, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2008, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2008, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2008, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2008, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2009, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2009, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2009, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2009, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2010, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2010, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2010, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2010, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2010, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2010, 5, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2010, 10, 11)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2011, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2011, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2011, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2011, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 24)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2011, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2011, 5, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2011, 10, 10)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2012, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2012, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2012, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2012, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 8)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2012, 4, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2012, 5, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2012, 10, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2013, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2013, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2013, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 31)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2013, 4, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2013, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2013, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2014, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2014, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2014, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2014, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2015, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2015, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2015, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 5)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2015, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2015, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2016, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2016, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2016, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2016, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2016, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 27)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2016, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2016, 5, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2016, 10, 10)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2017, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2017, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2017, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2017, 5, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2017, 10, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2018, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2018, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2018, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2018, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2018, 4, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2018, 5, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2018, 10, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2019, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2019, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2019, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2019, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2019, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2020, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2020, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2020, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2020, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2021, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2021, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2021, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2021, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2021, 5, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2021, 10, 11)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2022, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2022, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2022, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2022, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2022, 5, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2022, 10, 10)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2023, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2023, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2023, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 9)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2023, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2023, 5, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2023, 10, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2024, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2024, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2024, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 31)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2024, 4, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2024, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2024, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2025, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2025, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2025, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 20)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2025, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2025, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2026, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2026, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2026, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 5)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2026, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2026, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2027, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2027, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2027, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2027, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2027, 5, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2027, 10, 11)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2028, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2028, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2028, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2028, 5, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2028, 10, 16)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2029, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2029, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2029, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2029, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2029, 5, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2029, 10, 15)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Año Nuevo [New Year's Day]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Trabajadores [International Workers' Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jura de la Constitución [Constitution Day]")); - let date = NaiveDate::from_ymd_res(2030, 8, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de la Familia [Day of the Family]")); - let date = NaiveDate::from_ymd_res(2030, 1, 6)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Niños [Children's Day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Natalicio de José Gervasio Artigas [Birthday of José Gervasio Artigas]")); - let date = NaiveDate::from_ymd_res(2030, 11, 2)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de los Difuntos [All Souls' Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Carnaval [Carnival's Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Jueves Santo [Holy Thursday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Viernes Santo [Holy Friday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 21)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día de Pascuas [Easter Day]")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Desembarco de los 33 Orientales [Landing of the 33 Patriots]")); - let date = NaiveDate::from_ymd_res(2030, 5, 18)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Batalla de Las Piedras [Battle of Las Piedras]")); - let date = NaiveDate::from_ymd_res(2030, 10, 12)?; - m.insert(date, Holiday::new(Country::UY, "Uruguay", date, "Día del Respeto a la Diversidad Cultural [Respect for Cultural Diversity Day]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Uzbekistan. -#[cfg(feature = "UZ")] -pub mod uz { -use super::*; - -/// Generate holiday map for Uzbekistan. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2000, 1, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2000, 12, 27)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2000, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 16)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2000, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2001, 12, 16)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2001, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 5)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2001, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2002, 12, 5)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2002, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 22)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2002, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2003, 11, 25)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2003, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2003, 2, 11)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2003, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2004, 11, 14)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2004, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2004, 2, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2004, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2005, 11, 3)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2005, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2005, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2006, 10, 23)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2006, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 10)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2006, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2007, 10, 13)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2007, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 20)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2007, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2008, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait, Teacher's Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution, Kurban Khait")); - let date = NaiveDate::from_ymd_res(2008, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2009, 9, 20)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2009, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2009, 11, 27)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2009, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2010, 9, 10)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2010, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2010, 11, 16)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2010, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2011, 8, 30)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2011, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2011, 11, 6)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2011, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2012, 8, 19)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2012, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 26)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2012, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2013, 8, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2013, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 15)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2013, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2014, 7, 28)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2014, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 4)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2014, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2015, 7, 17)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2015, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 23)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2015, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2016, 7, 6)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2016, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 11)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2016, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2017, 6, 25)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2017, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day, Kurban Khait")); - let date = NaiveDate::from_ymd_res(2017, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2018, 6, 15)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2018, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2018, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2019, 6, 4)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2019, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 11)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2019, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2020, 5, 24)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2020, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 31)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2020, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2021, 5, 13)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2021, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 20)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2021, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2022, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2022, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2023, 4, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2023, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2023, 6, 28)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2023, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2024, 4, 10)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2024, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2024, 6, 16)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2024, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2025, 3, 30)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2025, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2025, 6, 6)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2025, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2026, 3, 20)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2026, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 27)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2026, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2027, 3, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2027, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 16)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2027, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2028, 2, 26)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2028, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 5)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2028, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2029, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 24)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2029, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "New Year")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Women's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 21)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Nauryz")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Ramadan Khait")); - let date = NaiveDate::from_ymd_res(2030, 5, 9)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Memorial Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 13)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Kurban Khait")); - let date = NaiveDate::from_ymd_res(2030, 9, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 1)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Teacher's Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 8)?; - m.insert(date, Holiday::new(Country::UZ, "Uzbekistan", date, "Constitution")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Venezuela. -#[cfg(feature = "VE")] -pub mod ve { -use super::*; - -/// Generate holiday map for Venezuela. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2000, 3, 6)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2000, 3, 7)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2000, 4, 20)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2000, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2000, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2000, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2000, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2000, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2000, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2001, 2, 26)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2001, 2, 27)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2001, 4, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2001, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2001, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2001, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2001, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2001, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Raza [Columbus Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2001, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2002, 3, 28)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2002, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2002, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2002, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2002, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2002, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2002, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2002, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2003, 3, 3)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2003, 3, 4)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2003, 4, 17)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2003, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2003, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2003, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2003, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2003, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2003, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2004, 2, 23)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2004, 2, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2004, 4, 8)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2004, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2004, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2004, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2004, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2004, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2004, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2005, 2, 7)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2005, 3, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2005, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2005, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2005, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2005, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2005, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2005, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2005, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2006, 2, 27)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2006, 2, 28)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2006, 4, 13)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2006, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2006, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2006, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2006, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2006, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2006, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2006, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2007, 4, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2007, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2007, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2007, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2007, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2007, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2007, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2007, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2008, 2, 4)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2008, 2, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2008, 3, 20)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2008, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2008, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2008, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2008, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2008, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2008, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2008, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2009, 2, 23)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2009, 2, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2009, 4, 9)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2009, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2009, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2009, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2009, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2009, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2009, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2009, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2010, 4, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2010, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2010, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2010, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2010, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2010, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2010, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2011, 3, 7)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2011, 4, 21)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2011, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2011, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2011, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2011, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2011, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2011, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2011, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2012, 2, 20)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2012, 2, 21)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2012, 4, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2012, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2012, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2012, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2012, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2012, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2012, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2012, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2013, 3, 28)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2013, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2013, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2013, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2013, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2013, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2013, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2013, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2014, 3, 3)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2014, 3, 4)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2014, 4, 17)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2014, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2014, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2014, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2014, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2014, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2014, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2015, 2, 16)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2015, 2, 17)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2015, 4, 2)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2015, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2015, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2015, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2015, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2015, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2015, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2015, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2016, 3, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2016, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2016, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2016, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2016, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2016, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2016, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2016, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2017, 2, 27)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2017, 2, 28)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2017, 4, 13)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2017, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2017, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2017, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2017, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2017, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2017, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2017, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2018, 2, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2018, 2, 13)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2018, 3, 29)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2018, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2018, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2018, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2018, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2018, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2018, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2018, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2019, 3, 4)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2019, 3, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence], Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2019, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2019, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2019, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2019, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2019, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2019, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2020, 2, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2020, 2, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2020, 4, 9)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2020, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2020, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2020, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2020, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2020, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2020, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2020, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2021, 4, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2021, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2021, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2021, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2021, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2021, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2021, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2022, 2, 28)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2022, 3, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2022, 4, 14)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2022, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2022, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2022, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2022, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2022, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2022, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2022, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2023, 2, 20)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2023, 4, 6)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2023, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2023, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2023, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2023, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2023, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2023, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2023, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2024, 3, 28)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2024, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2024, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2024, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2024, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2024, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2024, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2024, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2025, 3, 3)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2025, 3, 4)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2025, 4, 17)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2025, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2025, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2025, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2025, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2025, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2025, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2026, 4, 2)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2026, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2026, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2026, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2026, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2026, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2026, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2026, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2027, 3, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2027, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2027, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2027, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2027, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2027, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2027, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2028, 2, 28)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2028, 2, 29)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2028, 4, 13)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2028, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2028, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2028, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2028, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2028, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2028, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2028, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2029, 3, 29)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2029, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence]")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2029, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2029, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2029, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2029, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2029, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2029, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Año Nuevo [New Year's]")); - let date = NaiveDate::from_ymd_res(2030, 3, 4)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Lunes de Carnaval [Monday of Carnival]")); - let date = NaiveDate::from_ymd_res(2030, 3, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Martes de Carnaval [Tuesday of Carnival]")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Jueves Santo [Maundy Thursday]")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Declaración de la Independencia [Declaration of Independence], Viernes Santo [Good Friday]")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Dia Mundial del Trabajador [International Worker's Day]")); - let date = NaiveDate::from_ymd_res(2030, 6, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Batalla de Carabobo [Battle of Carabobo]")); - let date = NaiveDate::from_ymd_res(2030, 7, 5)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Independencia [Independence Day]")); - let date = NaiveDate::from_ymd_res(2030, 7, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Natalicio de Simón Bolívar [Birth of Simon Bolivar]")); - let date = NaiveDate::from_ymd_res(2030, 10, 12)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de la Resistencia Indígena [Day of Indigenous Resistance]")); - let date = NaiveDate::from_ymd_res(2030, 12, 24)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Nochebuena [Christmas Eve]")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Día de Navidad [Christmas Day]")); - let date = NaiveDate::from_ymd_res(2030, 12, 31)?; - m.insert(date, Holiday::new(Country::VE, "Venezuela", date, "Fiesta de Fin de Año [New Year's Eve]")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Vietnam. -#[cfg(feature = "VN")] -pub mod vn { -use super::*; - -/// Generate holiday map for Vietnam. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2000, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 1, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2000, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2000, 9, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2000, 2, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2000, 2, 5)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2000, 2, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2000, 2, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2000, 2, 8)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2000, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 9, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2001, 1, 23)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2001, 1, 24)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2001, 1, 25)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2001, 1, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2001, 1, 27)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2001, 1, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2002, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2002, 2, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2002, 2, 13)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 14)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 15)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2002, 2, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2003, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 1, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2003, 2, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2003, 2, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2003, 2, 5)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2004, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2004, 1, 21)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2004, 1, 22)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2004, 1, 23)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2004, 1, 24)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2004, 1, 25)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2004, 1, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2005, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 1, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2005, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2005, 2, 8)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2005, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2005, 2, 10)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2005, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2005, 2, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2005, 2, 13)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2006, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2006, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2006, 9, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2006, 1, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2006, 1, 29)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2006, 1, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2006, 1, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2006, 2, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2006, 2, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 9, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2007, 2, 17)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2007, 2, 18)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2007, 2, 19)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2007, 2, 20)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2007, 2, 21)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2007, 2, 22)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 15)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2008, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2008, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 2, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2008, 2, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2008, 2, 8)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2008, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2008, 2, 10)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2008, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 5)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2009, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day observed")); - let date = NaiveDate::from_ymd_res(2009, 1, 25)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2009, 1, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2009, 1, 27)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2009, 1, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2009, 1, 29)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2009, 1, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 23)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2010, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2010, 2, 13)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2010, 2, 14)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2010, 2, 15)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2010, 2, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2010, 2, 17)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2010, 2, 18)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2011, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 1, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2011, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2011, 2, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2011, 2, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2011, 2, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2011, 2, 5)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2011, 2, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2011, 2, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2012, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2012, 4, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day observed")); - let date = NaiveDate::from_ymd_res(2012, 9, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2012, 1, 22)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2012, 1, 23)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2012, 1, 24)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2012, 1, 25)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2012, 1, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2012, 1, 27)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 19)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2013, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2013, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2013, 2, 10)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2013, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2013, 2, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2013, 2, 13)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2013, 2, 14)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2014, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 1, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2014, 1, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2014, 2, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2014, 2, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2014, 2, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2014, 2, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2015, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 2, 18)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2015, 2, 19)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2015, 2, 20)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2015, 2, 21)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2015, 2, 22)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2015, 2, 23)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2016, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 4, 18)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day observed")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2016, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2016, 2, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2016, 2, 8)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2016, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2016, 2, 10)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2016, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2016, 2, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2017, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2017, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2017, 9, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2017, 1, 27)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2017, 1, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2017, 1, 29)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2017, 1, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2017, 1, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2017, 2, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 25)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2018, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 9, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2018, 2, 15)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2018, 2, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2018, 2, 17)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2018, 2, 18)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2018, 2, 19)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2018, 2, 20)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 14)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2019, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 15)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day observed")); - let date = NaiveDate::from_ymd_res(2019, 2, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2019, 2, 5)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2019, 2, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2019, 2, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2019, 2, 8)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2019, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2020, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 1, 24)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2020, 1, 25)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2020, 1, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2020, 1, 27)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2020, 1, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2020, 1, 29)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 21)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2021, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2021, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2021, 2, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2021, 2, 13)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2021, 2, 14)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2021, 2, 15)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2021, 2, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 10)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2022, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 1, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2022, 4, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day observed")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2022, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2022, 1, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2022, 2, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2022, 2, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2022, 2, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2022, 2, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2022, 2, 5)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 29)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2023, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2023, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day observed")); - let date = NaiveDate::from_ymd_res(2023, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2023, 9, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2023, 1, 21)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2023, 1, 22)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2023, 1, 23)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2023, 1, 24)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2023, 1, 25)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2023, 1, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 18)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2024, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2024, 2, 10)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2024, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2024, 2, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2024, 2, 13)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2024, 2, 14)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2025, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 1, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2025, 1, 29)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2025, 1, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2025, 1, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2025, 2, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2025, 2, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2026, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 27)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day observed")); - let date = NaiveDate::from_ymd_res(2026, 2, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2026, 2, 17)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2026, 2, 18)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2026, 2, 19)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2026, 2, 20)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2026, 2, 21)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2027, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2027, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day observed")); - let date = NaiveDate::from_ymd_res(2027, 2, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2027, 2, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2027, 2, 8)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2027, 2, 9)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2027, 2, 10)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2027, 2, 11)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2028, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 1, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day observed")); - let date = NaiveDate::from_ymd_res(2028, 5, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day observed")); - let date = NaiveDate::from_ymd_res(2028, 9, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2028, 1, 26)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2028, 1, 27)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2028, 1, 28)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2028, 1, 29)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2028, 1, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2028, 1, 31)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 23)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2029, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 9, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day observed")); - let date = NaiveDate::from_ymd_res(2029, 2, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2029, 2, 13)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2029, 2, 14)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 15)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 16)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2029, 2, 17)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 12)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Hung Kings Commemoration Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 30)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Liberation Day/Reunification Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "International Labor Day")); - let date = NaiveDate::from_ymd_res(2030, 9, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 2)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year's Eve")); - let date = NaiveDate::from_ymd_res(2030, 2, 3)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "Vietnamese New Year")); - let date = NaiveDate::from_ymd_res(2030, 2, 4)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The second day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 5)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The third day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 6)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The forth day of Tet Holiday")); - let date = NaiveDate::from_ymd_res(2030, 2, 7)?; - m.insert(date, Holiday::new(Country::VN, "Vietnam", date, "The fifth day of Tet Holiday")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Zambia. -#[cfg(feature = "ZM")] -pub mod zm { -use super::*; - -/// Generate holiday map for Zambia. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2000, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2000, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 3, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day (Observed)")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2001, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2001, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2001, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2002, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2002, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2003, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2003, 7, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2003, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2004, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2004, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 10, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2005, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2005, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2006, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2006, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2006, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2006, 3, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2007, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2007, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2007, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2008, 7, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2008, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2009, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2009, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 3, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day (Observed)")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2010, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2010, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 10, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2011, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2011, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2011, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2012, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2012, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2012, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2013, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2013, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2014, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2014, 7, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2014, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2015, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2015, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 3, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2015, 10, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day (Observed)")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 8, 11)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "General elections and referendum")); - let date = NaiveDate::from_ymd_res(2016, 9, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Inauguration ceremony of President-elect and Vice President-elect")); - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2016, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2016, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2017, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2017, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2017, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2017, 3, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 3, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Public holiday")); - let date = NaiveDate::from_ymd_res(2018, 7, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Lusaka mayoral and other local government elections")); - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2018, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2018, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2019, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2019, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2019, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2020, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2020, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 3, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2020, 10, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day (Observed)")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Memorial service for Kenneth Kaunda")); - let date = NaiveDate::from_ymd_res(2021, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Funeral of Kenneth Kaunda")); - let date = NaiveDate::from_ymd_res(2021, 8, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "General elections")); - let date = NaiveDate::from_ymd_res(2021, 8, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Counting in general elections")); - let date = NaiveDate::from_ymd_res(2021, 8, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Presidential inauguration")); - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2021, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2021, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 10, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 3, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Funeral of Rupiah Banda")); - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2022, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2022, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2022, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2022, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2023, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2023, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2023, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2023, 3, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 3, 30)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2024, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2024, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 4, 29)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day (Observed)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2025, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2025, 7, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2025, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2026, 7, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2026, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 3, 9)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day (Observed)")); - let date = NaiveDate::from_ymd_res(2026, 10, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day (Observed)")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 27)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2027, 7, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 10, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2028, 7, 4)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 7)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2028, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 3, 13)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day (Observed)")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2029, 7, 3)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 6)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2029, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 8)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "International Women's Day")); - let date = NaiveDate::from_ymd_res(2030, 3, 12)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Youth Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Holy Saturday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 4, 28)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Labour Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Africa Freedom Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 1)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Heroes' Day")); - let date = NaiveDate::from_ymd_res(2030, 7, 2)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 5)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Farmers' Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 18)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "National Prayer Day")); - let date = NaiveDate::from_ymd_res(2030, 10, 24)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 29)?; - m.insert(date, Holiday::new(Country::ZM, "Zambia", date, "Kenneth Kaunda Day (Observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} -/// Zimbabwe. -#[cfg(feature = "ZW")] -pub mod zw { -use super::*; - -/// Generate holiday map for Zimbabwe. -#[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - - if years.is_none() || years.unwrap().contains(&2000) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2000, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2000, 4, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2000, 4, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2000, 4, 24)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2000, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2000, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2000, 8, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2000, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2000, m); - } - - if years.is_none() || years.unwrap().contains(&2001) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2001, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2001, 4, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2001, 4, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2001, 4, 16)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2001, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2001, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2001, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2001, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2001, m); - } - - if years.is_none() || years.unwrap().contains(&2002) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2002, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2002, 3, 29)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2002, 3, 30)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2002, 4, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2002, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2002, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2002, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2002, 12, 23)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day (Observed)")); - map.insert(2002, m); - } - - if years.is_none() || years.unwrap().contains(&2003) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2003, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday, Independence Day")); - let date = NaiveDate::from_ymd_res(2003, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2003, 4, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2003, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2003, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2003, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2003, 5, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day (Observed)")); - map.insert(2003, m); - } - - if years.is_none() || years.unwrap().contains(&2004) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2004, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2004, 4, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2004, 4, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2004, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2004, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2004, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2004, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2004, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2004, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day (Observed)")); - map.insert(2004, m); - } - - if years.is_none() || years.unwrap().contains(&2005) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2005, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2005, 3, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2005, 3, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2005, 3, 28)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2005, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 8)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2005, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2005, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2005, 5, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2005, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day (Observed)")); - map.insert(2005, m); - } - - if years.is_none() || years.unwrap().contains(&2006) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2006, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2006, 4, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2006, 4, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2006, 4, 17)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2006, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2006, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2006, 8, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2006, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2006, 1, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day (Observed)")); - map.insert(2006, m); - } - - if years.is_none() || years.unwrap().contains(&2007) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2007, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2007, 4, 6)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2007, 4, 7)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2007, 4, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2007, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2007, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2007, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2007, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2007, m); - } - - if years.is_none() || years.unwrap().contains(&2008) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2008, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2008, 3, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2008, 3, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2008, 3, 24)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2008, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2008, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2008, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2008, 5, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day (Observed)")); - map.insert(2008, m); - } - - if years.is_none() || years.unwrap().contains(&2009) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2009, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2009, 4, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2009, 4, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2009, 4, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2009, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2009, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2009, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2009, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2009, m); - } - - if years.is_none() || years.unwrap().contains(&2010) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2010, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2010, 4, 3)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2010, 4, 5)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2010, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2010, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2010, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2010, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2010, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2010, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day (Observed)")); - map.insert(2010, m); - } - - if years.is_none() || years.unwrap().contains(&2011) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2011, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2011, 4, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2011, 4, 23)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2011, 4, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2011, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 8)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2011, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2011, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2011, 5, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2011, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day (Observed)")); - map.insert(2011, m); - } - - if years.is_none() || years.unwrap().contains(&2012) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2012, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2012, 4, 6)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2012, 4, 7)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2012, 4, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2012, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2012, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2012, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2012, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2012, 1, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day (Observed)")); - map.insert(2012, m); - } - - if years.is_none() || years.unwrap().contains(&2013) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2013, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2013, 3, 29)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2013, 3, 30)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2013, 4, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2013, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2013, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2013, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2013, 12, 23)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day (Observed)")); - map.insert(2013, m); - } - - if years.is_none() || years.unwrap().contains(&2014) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2014, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday, Independence Day")); - let date = NaiveDate::from_ymd_res(2014, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2014, 4, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2014, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2014, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2014, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2014, 5, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day (Observed)")); - map.insert(2014, m); - } - - if years.is_none() || years.unwrap().contains(&2015) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2015, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2015, 4, 3)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2015, 4, 4)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2015, 4, 6)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2015, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2015, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2015, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2015, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2015, m); - } - - if years.is_none() || years.unwrap().contains(&2016) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2016, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2016, 3, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2016, 3, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2016, 3, 28)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2016, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 8)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2016, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2016, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2016, 5, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2016, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day (Observed)")); - map.insert(2016, m); - } - - if years.is_none() || years.unwrap().contains(&2017) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2017, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2017, 4, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2017, 4, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2017, 4, 17)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2017, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2017, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2017, 8, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2017, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2017, 1, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day (Observed)")); - map.insert(2017, m); - } - - if years.is_none() || years.unwrap().contains(&2018) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2018, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2018, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2018, 3, 30)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2018, 3, 31)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2018, 4, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2018, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2018, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2018, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2018, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2018, m); - } - - if years.is_none() || years.unwrap().contains(&2019) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2019, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2019, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2019, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2019, 4, 20)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2019, 4, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2019, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2019, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2019, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2019, 12, 23)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day (Observed)")); - map.insert(2019, m); - } - - if years.is_none() || years.unwrap().contains(&2020) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2020, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2020, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2020, 4, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2020, 4, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2020, 4, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2020, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2020, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2020, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2020, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2020, m); - } - - if years.is_none() || years.unwrap().contains(&2021) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2021, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2021, 4, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2021, 4, 3)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2021, 4, 5)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2021, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2021, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2021, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2021, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2021, 2, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2021, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day (Observed)")); - map.insert(2021, m); - } - - if years.is_none() || years.unwrap().contains(&2022) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2022, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2022, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2022, 4, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2022, 4, 16)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2022, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday, Independence Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 8)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2022, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2022, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2022, 5, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day (Observed)")); - let date = NaiveDate::from_ymd_res(2022, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day (Observed)")); - map.insert(2022, m); - } - - if years.is_none() || years.unwrap().contains(&2023) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2023, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2023, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2023, 4, 7)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2023, 4, 8)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2023, 4, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2023, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2023, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2023, 8, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2023, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2023, 1, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day (Observed)")); - map.insert(2023, m); - } - - if years.is_none() || years.unwrap().contains(&2024) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2024, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2024, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2024, 3, 29)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2024, 3, 30)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2024, 4, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2024, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2024, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2024, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2024, 12, 23)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day (Observed)")); - map.insert(2024, m); - } - - if years.is_none() || years.unwrap().contains(&2025) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2025, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2025, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday, Independence Day")); - let date = NaiveDate::from_ymd_res(2025, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2025, 4, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2025, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2025, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2025, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2025, 5, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day (Observed)")); - map.insert(2025, m); - } - - if years.is_none() || years.unwrap().contains(&2026) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2026, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2026, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2026, 4, 3)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2026, 4, 4)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2026, 4, 6)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2026, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2026, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2026, 8, 11)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2026, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2026, m); - } - - if years.is_none() || years.unwrap().contains(&2027) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2027, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2027, 3, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2027, 3, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2027, 3, 29)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2027, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2027, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 9)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2027, 8, 10)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2027, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2027, 2, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day (Observed)")); - let date = NaiveDate::from_ymd_res(2027, 12, 27)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day (Observed)")); - map.insert(2027, m); - } - - if years.is_none() || years.unwrap().contains(&2028) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2028, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2028, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2028, 4, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2028, 4, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2028, 4, 17)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2028, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2028, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2028, 8, 15)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2028, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2028, m); - } - - if years.is_none() || years.unwrap().contains(&2029) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2029, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2029, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2029, 3, 30)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2029, 3, 31)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2029, 4, 2)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2029, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2029, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2029, 8, 14)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2029, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - map.insert(2029, m); - } - - if years.is_none() || years.unwrap().contains(&2030) { - let mut m = BTreeMap::new(); - - let date = NaiveDate::from_ymd_res(2030, 1, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "New Year's Day")); - let date = NaiveDate::from_ymd_res(2030, 2, 21)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Robert Gabriel Mugabe National Youth Day")); - let date = NaiveDate::from_ymd_res(2030, 4, 19)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Good Friday")); - let date = NaiveDate::from_ymd_res(2030, 4, 20)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Saturday")); - let date = NaiveDate::from_ymd_res(2030, 4, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Easter Monday")); - let date = NaiveDate::from_ymd_res(2030, 4, 18)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Independence Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 1)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Workers' Day")); - let date = NaiveDate::from_ymd_res(2030, 5, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Africa Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 12)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Zimbabwe Heroes' Day")); - let date = NaiveDate::from_ymd_res(2030, 8, 13)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Defense Forces Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 22)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 25)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Christmas Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 26)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Boxing Day")); - let date = NaiveDate::from_ymd_res(2030, 12, 23)?; - m.insert(date, Holiday::new(Country::ZW, "Zimbabwe", date, "Unity Day (Observed)")); - map.insert(2030, m); - } - - Ok(map) -} -} \ No newline at end of file diff --git a/src/data/ae.rs b/src/data/ae.rs new file mode 100644 index 0000000..5f64582 --- /dev/null +++ b/src/data/ae.rs @@ -0,0 +1,1244 @@ +//! United Arab Emirates +use super::*; + +/// Generate holiday map for United Arab Emirates. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2000, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2000, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2000, 1, 8)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2000, 12, 27)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2000, 3, 15)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2000, 3, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 24)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2001, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2001, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2001, 3, 4)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 14)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2002, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2002, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2002, 12, 5)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2002, 2, 21)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2002, 2, 22)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 4)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2003, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2003, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2003, 2, 10)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 24)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2004, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2004, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2004, 1, 31)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 3)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 21)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 12)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2005, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2005, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2005, 1, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + (NaiveDate::from_ymd_res(2005, 9, 1)?, "(تقدير) ليلة المعراج"), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2006, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2006, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2006, 1, 9)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2006, 12, 30)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 31)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 21)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 10)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "(تقدير) عطلة عيد الأضحى; رأس السنة الميلادية", + ), + (NaiveDate::from_ymd_res(2007, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2007, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2007, 12, 19)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2007, 12, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 20)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 10)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2008, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2008, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2008, 12, 7)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2008, 12, 9)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 29)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 30)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2009, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2009, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2009, 11, 26)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2009, 11, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 18)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 20)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2010, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2010, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2010, 11, 15)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + (NaiveDate::from_ymd_res(2010, 7, 9)?, "(تقدير) ليلة المعراج"), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2011, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2011, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2011, 11, 5)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 29)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2012, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2012, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2012, 10, 25)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2012, 10, 27)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 17)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2013, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2013, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2013, 10, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + (NaiveDate::from_ymd_res(2013, 6, 6)?, "(تقدير) ليلة المعراج"), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2014, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2014, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 30)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2014, 10, 5)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 26)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2015, 11, 30)?, "يوم الشهيد"), + (NaiveDate::from_ymd_res(2015, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2015, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 19)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2015, 9, 22)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2015, 9, 23)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2015, 9, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 25)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 16)?, + "(تقدير) ليلة المعراج", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 23)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2016, 11, 30)?, "يوم الشهيد"), + (NaiveDate::from_ymd_res(2016, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2016, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2016, 9, 10)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2016, 9, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 2)?, + "(تقدير) رأس السنة الهجرية", + ), + (NaiveDate::from_ymd_res(2016, 5, 4)?, "(تقدير) ليلة المعراج"), + ( + NaiveDate::from_ymd_res(2016, 12, 11)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2017, 11, 30)?, + "عيد المولد النبوي; يوم الشهيد", + ), + (NaiveDate::from_ymd_res(2017, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2017, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2017, 6, 26)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2017, 6, 27)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2017, 8, 31)?, "وقفة عرفة"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "عيد الأضحى"), + (NaiveDate::from_ymd_res(2017, 9, 2)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2017, 9, 3)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2017, 9, 22)?, "رأس السنة الهجرية"), + (NaiveDate::from_ymd_res(2017, 4, 23)?, "ليلة المعراج"), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2018, 11, 30)?, "يوم الشهيد"), + (NaiveDate::from_ymd_res(2018, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2018, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2018, 6, 14)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2018, 6, 16)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2018, 8, 20)?, "وقفة عرفة"), + (NaiveDate::from_ymd_res(2018, 8, 21)?, "عيد الأضحى"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2018, 8, 23)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2018, 9, 11)?, "رأس السنة الهجرية"), + (NaiveDate::from_ymd_res(2018, 4, 13)?, "ليلة المعراج"), + (NaiveDate::from_ymd_res(2018, 11, 19)?, "عيد المولد النبوي"), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2019, 12, 1)?, "يوم الشهيد"), + (NaiveDate::from_ymd_res(2019, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2019, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2019, 6, 6)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2019, 6, 3)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2019, 8, 10)?, "وقفة عرفة"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "عيد الأضحى"), + (NaiveDate::from_ymd_res(2019, 8, 12)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2019, 8, 13)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2019, 8, 31)?, "رأس السنة الهجرية"), + (NaiveDate::from_ymd_res(2019, 11, 9)?, "عيد المولد النبوي"), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2020, 12, 1)?, "يوم الشهيد"), + (NaiveDate::from_ymd_res(2020, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2020, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2020, 5, 26)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2020, 5, 23)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2020, 7, 30)?, "وقفة عرفة"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "عيد الأضحى"), + (NaiveDate::from_ymd_res(2020, 8, 1)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2020, 8, 2)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2020, 8, 23)?, "رأس السنة الهجرية"), + (NaiveDate::from_ymd_res(2020, 10, 29)?, "عيد المولد النبوي"), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2021, 12, 1)?, "يوم الشهيد"), + (NaiveDate::from_ymd_res(2021, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2021, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2021, 5, 14)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2021, 5, 15)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2021, 5, 12)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2021, 7, 19)?, "وقفة عرفة"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "عيد الأضحى"), + (NaiveDate::from_ymd_res(2021, 7, 21)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2021, 7, 22)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2021, 8, 12)?, "رأس السنة الهجرية"), + (NaiveDate::from_ymd_res(2021, 10, 21)?, "عيد المولد النبوي"), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2022, 12, 1)?, "يوم الشهيد"), + (NaiveDate::from_ymd_res(2022, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2022, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2022, 5, 4)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2022, 7, 8)?, "وقفة عرفة"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "عيد الأضحى"), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2022, 7, 11)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2022, 7, 30)?, "رأس السنة الهجرية"), + (NaiveDate::from_ymd_res(2022, 10, 8)?, "عيد المولد النبوي"), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2023, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2023, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2023, 4, 23)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2023, 4, 20)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2023, 6, 27)?, "وقفة عرفة"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "عيد الأضحى"), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2023, 6, 30)?, "عطلة عيد الأضحى"), + (NaiveDate::from_ymd_res(2023, 7, 21)?, "رأس السنة الهجرية"), + (NaiveDate::from_ymd_res(2023, 9, 29)?, "عيد المولد النبوي"), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2024, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2024, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "عيد الفطر"), + (NaiveDate::from_ymd_res(2024, 4, 11)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2024, 4, 12)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2024, 4, 9)?, "عطلة عيد الفطر"), + (NaiveDate::from_ymd_res(2024, 6, 15)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2025, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2025, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2025, 3, 30)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2025, 6, 5)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2026, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2026, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2026, 3, 20)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 19)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2026, 5, 26)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2026, 5, 27)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 16)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2027, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2027, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2027, 3, 9)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2027, 5, 15)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2028, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2028, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2028, 2, 26)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2028, 5, 4)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2029, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2029, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 13)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2029, 4, 23)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2029, 4, 24)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 26)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2030, 12, 2)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2030, 12, 3)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2030, 4, 12)?, "(تقدير) وقفة عرفة"), + (NaiveDate::from_ymd_res(2030, 4, 13)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::AE, + "United Arab Emirates", + ); + + Ok(map) +} diff --git a/src/data/am.rs b/src/data/am.rs new file mode 100644 index 0000000..e864820 --- /dev/null +++ b/src/data/am.rs @@ -0,0 +1,1028 @@ +//! Armenia +use super::*; + +/// Generate holiday map for Armenia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2000, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2000, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2000, 4, 7)?, + "Մայրության և գեղեցկության տոն", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2000, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2000, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2000, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2000, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2001, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2001, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2001, 4, 7)?, + "Մայրության և գեղեցկության տոն", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Աշխատավորների համերաշխության միջազգային օր", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2001, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2001, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2001, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2001, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2002, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2002, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2002, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2002, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2002, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2002, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2002, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2003, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2003, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2003, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2003, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2003, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2003, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2003, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2003, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2003, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2004, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2004, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2004, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2004, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2004, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2004, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2004, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2004, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2004, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2005, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2005, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2005, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2005, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2005, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2005, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2005, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2005, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2005, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2006, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2006, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2006, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2006, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2006, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2006, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2006, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2007, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2007, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2007, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2007, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2007, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2007, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2007, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2007, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2008, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2008, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2008, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2008, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2008, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2008, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2008, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2008, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2008, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2009, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2009, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2009, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2009, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2009, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2009, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2009, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2009, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2010, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2010, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2010, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2010, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2010, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2010, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2010, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2010, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2010, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2010, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2010, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2010, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2010, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2011, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2011, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2011, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2011, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2011, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2011, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2011, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2011, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2011, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2011, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2011, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2011, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2012, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2012, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2012, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2012, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2012, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2012, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2012, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2012, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2012, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2012, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2012, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2012, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2013, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2013, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2013, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2013, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2013, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2013, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2013, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2013, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2013, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2013, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2013, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2013, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2014, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2014, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2014, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2014, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2014, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2014, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2014, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2014, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2014, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2014, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2014, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2014, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2015, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2015, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2015, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2015, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2015, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2015, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2015, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2015, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2015, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2015, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2015, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2015, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2015, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2016, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2016, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2016, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2016, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2016, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2016, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2016, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2016, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2016, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2016, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2016, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2016, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2016, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2017, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2017, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2017, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2017, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2017, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2017, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2017, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2017, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2017, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2017, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2017, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2017, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2018, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2018, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2018, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2018, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2018, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2018, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2018, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2018, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2018, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2018, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2018, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2019, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2019, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2019, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2019, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2019, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2019, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2019, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2019, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2019, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2019, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2019, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2019, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2019, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2020, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2020, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2020, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2020, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2020, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2020, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2020, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2020, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2020, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2020, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2020, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2020, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2021, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2021, 1, 3)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2021, 1, 4)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2021, 1, 5)?, "Սուրբ Ծննդյան տոներ"), + (NaiveDate::from_ymd_res(2021, 1, 7)?, "Մեռելոց հիշատակի օր"), + (NaiveDate::from_ymd_res(2021, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2021, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2021, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2021, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2021, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2021, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2021, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2021, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2022, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2022, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2022, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2022, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2022, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2022, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2022, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2022, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2022, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2023, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2023, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2023, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2023, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2023, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2023, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2023, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2024, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2024, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2024, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2024, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2024, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2024, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2024, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2024, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2025, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2025, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2025, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2025, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2025, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2025, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2025, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2025, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2025, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2026, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2026, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2026, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2026, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2026, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2026, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2026, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2026, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2026, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2027, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2027, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2027, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2027, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2027, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2027, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2027, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2027, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2027, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2028, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2028, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2028, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2028, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2028, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2028, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2028, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2029, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2029, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2029, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2029, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2029, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2029, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2029, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2029, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Նոր տարվա օր"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Նոր տարվա օր"), + ( + NaiveDate::from_ymd_res(2030, 1, 6)?, + "Սուրբ Ծնունդ եւ Հայտնություն", + ), + (NaiveDate::from_ymd_res(2030, 1, 28)?, "Բանակի օր"), + (NaiveDate::from_ymd_res(2030, 3, 8)?, "Կանանց տոն"), + ( + NaiveDate::from_ymd_res(2030, 4, 24)?, + "Եղեռնի զոհերի հիշատակի օր", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Աշխատանքի օր"), + ( + NaiveDate::from_ymd_res(2030, 5, 9)?, + "Հաղթանակի և Խաղաղության տոն", + ), + (NaiveDate::from_ymd_res(2030, 5, 28)?, "Հանրապետության օր"), + (NaiveDate::from_ymd_res(2030, 7, 5)?, "Սահմանադրության օր"), + (NaiveDate::from_ymd_res(2030, 9, 21)?, "Անկախության օր"), + (NaiveDate::from_ymd_res(2030, 12, 31)?, "Նոր տարվա գիշեր"), + ], + &mut map, + Country::AM, + "Armenia", + ); + + Ok(map) +} diff --git a/src/data/ao.rs b/src/data/ao.rs new file mode 100644 index 0000000..5206bfb --- /dev/null +++ b/src/data/ao.rs @@ -0,0 +1,1714 @@ +//! Angola +use super::*; + +/// Generate holiday map for Angola. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2000, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2000, 3, 7)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2000, 3, 8)?, + "Dia Internacional da Mulher", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 18)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2000, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2000, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2001, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2001, 2, 4)?, + "Dia do Início da Luta Armada", + ), + ( + NaiveDate::from_ymd_res(2001, 2, 5)?, + "Dia do Início da Luta Armada (ponte)", + ), + (NaiveDate::from_ymd_res(2001, 2, 27)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2001, 3, 8)?, + "Dia Internacional da Mulher", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2001, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2001, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2001, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2001, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 12)?, + "Dia da Independência Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2002, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2002, 3, 8)?, + "Dia Internacional da Mulher", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2002, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2002, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2002, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2002, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2003, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2003, 3, 4)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2003, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2003, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2003, 5, 26)?, + "Dia da África (ponte)", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 2)?, + "Dia Internacional da Criança (ponte)", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2003, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2003, 11, 3)?, + "Dia dos Finados (ponte)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2004, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 5)?, + "Dia dos Mártires da Repressão Colonial (ponte)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2004, 2, 24)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2004, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 5)?, + "Dia da Paz e Reconciliação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2004, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2004, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2004, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2004, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2005, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2005, 2, 8)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2005, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Dia Internacional do Trabalhador (ponte)", + ), + (NaiveDate::from_ymd_res(2005, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2005, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2005, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2005, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Dia do Natal"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Dia do Natal (ponte)", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "Dia do Ano Novo (ponte)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2006, 2, 28)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2006, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2006, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 18)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2006, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2006, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2007, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 4)?, + "Dia do Início da Luta Armada", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 5)?, + "Dia do Início da Luta Armada (ponte)", + ), + (NaiveDate::from_ymd_res(2007, 2, 20)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2007, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2007, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2007, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2007, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2007, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 12)?, + "Dia da Independência Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2008, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2008, 2, 5)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2008, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2008, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2008, 5, 26)?, + "Dia da África (ponte)", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 2)?, + "Dia Internacional da Criança (ponte)", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2008, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2008, 11, 3)?, + "Dia dos Finados (ponte)", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2009, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 5)?, + "Dia dos Mártires da Repressão Colonial (ponte)", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2009, 2, 24)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2009, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "Dia Internacional da Mulher (ponte)", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2009, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2009, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2009, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2010, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 4)?, + "Dia do Início da Luta Armada", + ), + (NaiveDate::from_ymd_res(2010, 2, 16)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2010, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Dia da Paz e Reconciliação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + (NaiveDate::from_ymd_res(2010, 5, 25)?, "Dia da África"), + ( + NaiveDate::from_ymd_res(2010, 6, 1)?, + "Dia Internacional da Criança", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2010, 11, 11)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Dia do Natal"), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2011, 1, 4)?, + "Dia dos Mártires da Repressão Colonial", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 4)?, + "Dia do Início da Luta Armada", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 8)?, + "Dia Internacional da Mulher; Dia do Carnaval", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Dia Internacional do Trabalhador (ponte)", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2011, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2011, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2012, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2012, 2, 21)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2012, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2012, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2012, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 12)?, + "Dia da Independência Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2013, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2013, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2013, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2013, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2014, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2014, 3, 4)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2014, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2014, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2014, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2015, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2015, 2, 17)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2015, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 9)?, + "Dia Internacional da Mulher (ponte)", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2015, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2015, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2016, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2016, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Dia Internacional do Trabalhador (ponte)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2016, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2016, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2017, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2017, 2, 28)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2017, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 18)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2017, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2017, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Dia de Natal e da Família", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 23)?, + "Dia de eleições gerais", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Dia do Ano Novo (ponte)", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 5)?, + "Dia do Início da Luta Armada de Libertação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2018, 2, 13)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2018, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2018, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2018, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Dia de Natal e da Família", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 24)?, + "Dia de Natal e da Família (ponte)", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2019, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2019, 3, 5)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2019, 3, 4)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 5)?, + "Dia da Paz e Reconciliação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 16)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2019, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2019, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2020, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 2, 3)?, + "Dia do Início da Luta Armada de Libertação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2020, 2, 25)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2020, 2, 24)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 18)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2020, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2020, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2021, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 5)?, + "Dia do Início da Luta Armada de Libertação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2021, 2, 16)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 22)?, + "Dia da Libertação da África Austral (ponte)", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2021, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2021, 11, 1)?, + "Dia dos Finados (ponte)", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 12)?, + "Dia da Independência Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2022, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2022, 3, 1)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2022, 2, 28)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 7)?, + "Dia Internacional da Mulher (ponte)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2022, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2022, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2023, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2023, 2, 21)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2023, 2, 20)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 24)?, + "Dia da Libertação da África Austral (ponte)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 3)?, + "Dia da Paz e Reconciliação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2023, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2023, 11, 3)?, + "Dia dos Finados (ponte)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2024, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2024, 2, 13)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2024, 2, 12)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 5)?, + "Dia da Paz e Reconciliação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 16)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2024, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2024, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2025, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 3)?, + "Dia do Início da Luta Armada de Libertação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2025, 3, 4)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2025, 3, 3)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 2)?, + "Dia Internacional do Trabalhador (ponte)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2025, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2025, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 10)?, + "Dia da Independência Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 25)?, + "Dia de Natal e da Família", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Dia de Natal e da Família (ponte)", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2026, 1, 2)?, + "Dia do Ano Novo (ponte)", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 18)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2026, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2026, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2027, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 5)?, + "Dia do Início da Luta Armada de Libertação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2027, 2, 9)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 22)?, + "Dia da Libertação da África Austral (ponte)", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2027, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2027, 11, 1)?, + "Dia dos Finados (ponte)", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 12)?, + "Dia da Independência Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2028, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2028, 2, 29)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 24)?, + "Dia da Libertação da África Austral (ponte)", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 3)?, + "Dia da Paz e Reconciliação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2028, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2028, 11, 3)?, + "Dia dos Finados (ponte)", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2029, 12, 31)?, + "Dia do Ano Novo (ponte)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2029, 2, 12)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 9)?, + "Dia Internacional da Mulher (ponte)", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 30)?, + "Dia Internacional do Trabalhador (ponte)", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + (NaiveDate::from_ymd_res(2029, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2029, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 25)?, + "Dia de Natal e da Família", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 24)?, + "Dia de Natal e da Família (ponte)", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Dia do Ano Novo"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Dia do Início da Luta Armada de Libertação Nacional", + ), + (NaiveDate::from_ymd_res(2030, 3, 5)?, "Dia do Carnaval"), + ( + NaiveDate::from_ymd_res(2030, 3, 4)?, + "Dia do Carnaval (ponte)", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "Dia Internacional da Mulher", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 23)?, + "Dia da Libertação da África Austral", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 4)?, + "Dia da Paz e Reconciliação Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 5)?, + "Dia da Paz e Reconciliação Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Sexta-Feira Santa"), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Dia Internacional do Trabalhador", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 17)?, + "Dia do Fundador da Nação e do Herói Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 16)?, + "Dia do Fundador da Nação e do Herói Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2030, 11, 2)?, "Dia dos Finados"), + ( + NaiveDate::from_ymd_res(2030, 11, 11)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 25)?, + "Dia de Natal e da Família", + ), + ], + &mut map, + Country::AO, + "Angola", + ); + + Ok(map) +} diff --git a/src/data/ar.rs b/src/data/ar.rs new file mode 100644 index 0000000..b366805 --- /dev/null +++ b/src/data/ar.rs @@ -0,0 +1,1661 @@ +//! Argentina +use super::*; + +/// Generate holiday map for Argentina. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2000, 4, 2)?, "Día del Veterano de Guerra"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2000, 5, 25)?, "Día de la Revolución de Mayo"), + (NaiveDate::from_ymd_res(2000, 6, 10)?, "Día de los Derechos Argentinos sobre las Islas Malvinas, Sandwich y del Atlántico Sur"), + (NaiveDate::from_ymd_res(2000, 6, 19)?, "Paso a la Inmortalidad del General Don Manuel Belgrano"), + (NaiveDate::from_ymd_res(2000, 7, 9)?, "Día de la Independencia"), + (NaiveDate::from_ymd_res(2000, 12, 8)?, "Inmaculada Concepción de María"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2000, 8, 21)?, "Paso a la Inmortalidad del General Don José de San Martin"), + (NaiveDate::from_ymd_res(2000, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2001, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2001, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 18)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2001, 8, 20)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2001, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2002, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2002, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 17)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2002, 8, 19)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2002, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2003, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2003, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 16)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2003, 8, 18)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2003, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2004, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2004, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 21)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2004, 8, 16)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2004, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2005, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2005, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2006, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 19)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2006, 8, 21)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2006, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2007, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2007, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 18)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2007, 8, 20)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2007, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2008, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 16)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2008, 8, 18)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2008, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2009, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2009, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 15)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2009, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Día de la Raza"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2010, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas; Viernes Santo", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2010, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 21)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2010, 8, 16)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 11)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 20)?, + "Día de la Soberanía Nacional", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2011, 3, 7)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2011, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2011, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2011, 8, 22)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 10)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 20)?, + "Día de la Soberanía Nacional", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 25)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 9)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2012, 2, 20)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2012, 2, 21)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2012, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 15)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 19)?, + "Día de la Soberanía Nacional (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 27)?, + "Bicentenario de la creación y primera jura de la bandera nacional", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 30)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 24)?, + "Bicentenario de la Batalla de Tucumán", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 24)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2013, + vec![ + + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2013, 3, 24)?, "Día Nacional de la Memoria por la Verdad y la Justicia"), + (NaiveDate::from_ymd_res(2013, 4, 2)?, "Día del Veterano y de los Caidos en la Guerra de Malvinas"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2013, 5, 25)?, "Día de la Revolución de Mayo"), + (NaiveDate::from_ymd_res(2013, 6, 20)?, "Paso a la Inmortalidad del General Don Manuel Belgrano"), + (NaiveDate::from_ymd_res(2013, 7, 9)?, "Día de la Independencia"), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Inmaculada Concepción de María"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2013, 8, 17)?, "Paso a la Inmortalidad del General Don José de San Martin"), + (NaiveDate::from_ymd_res(2013, 10, 12)?, "Día del Respeto a la Diversidad Cultural"), + (NaiveDate::from_ymd_res(2013, 11, 18)?, "Día de la Soberanía Nacional (observado)"), + (NaiveDate::from_ymd_res(2013, 1, 31)?, "Bicentenario de la sesión inaugural de la Asamblea Nacional Constituyente del año 1813"), + (NaiveDate::from_ymd_res(2013, 2, 20)?, "Bicentenario de la Batalla de Salta"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Feriado con fines turísticos"), + (NaiveDate::from_ymd_res(2013, 6, 21)?, "Feriado con fines turísticos"), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2014, 3, 4)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2014, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2014, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 24)?, + "Día de la Soberanía Nacional (observado)", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 2)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2015, 2, 16)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2015, 2, 17)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2015, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2015, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2015, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Día de la Soberanía Nacional", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 23)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 7)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2016, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2016, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2016, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 28)?, + "Día de la Soberanía Nacional", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 8)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 9)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2017, 2, 27)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2017, 2, 28)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2017, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2017, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 21)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 16)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 20)?, + "Día de la Soberanía Nacional", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2018, 2, 13)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2018, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2018, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2018, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 20)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 15)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 19)?, + "Día de la Soberanía Nacional (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 24)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2019, 3, 4)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2019, 3, 5)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2019, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2019, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2019, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 18)?, + "Día de la Soberanía Nacional (observado)", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 8)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 19)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2020, 2, 24)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2020, 2, 25)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2020, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 31)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2020, 6, 15)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes (observado)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 23)?, + "Día de la Soberanía Nacional (observado)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 23)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 10)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 7)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2021, 2, 15)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2021, 2, 16)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2021, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas; Viernes Santo", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2021, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2021, 6, 21)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 16)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 20)?, + "Día de la Soberanía Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 24)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 8)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 22)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2022, 2, 28)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2022, 3, 1)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2022, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2022, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2022, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 20)?, + "Día de la Soberanía Nacional", + ), + (NaiveDate::from_ymd_res(2022, 5, 18)?, "Censo nacional 2022"), + ( + NaiveDate::from_ymd_res(2022, 10, 7)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 21)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 9)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2023, 2, 20)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2023, 2, 21)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2023, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2023, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2023, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 21)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 16)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 20)?, + "Día de la Soberanía Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 26)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 19)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 13)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2024, 2, 13)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2024, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2024, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 18)?, + "Día de la Soberanía Nacional (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 21)?, + "Feriado con fines turísticos", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 11)?, + "Feriado con fines turísticos", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2025, 3, 4)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2025, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2025, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2025, 6, 16)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes (observado)", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 24)?, + "Día de la Soberanía Nacional (observado)", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2026, 2, 16)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2026, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2026, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2026, 6, 15)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes (observado)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 23)?, + "Día de la Soberanía Nacional (observado)", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2027, 2, 8)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2027, 2, 9)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2027, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2027, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2027, 6, 21)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 16)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 20)?, + "Día de la Soberanía Nacional", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2028, 2, 28)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2028, 2, 29)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2028, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2028, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 21)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 16)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 20)?, + "Día de la Soberanía Nacional", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2029, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2029, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2029, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 20)?, + "Paso a la Inmortalidad del General Don José de San Martin (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 15)?, + "Día del Respeto a la Diversidad Cultural (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 19)?, + "Día de la Soberanía Nacional (observado)", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2030, 3, 4)?, "Día de Carnaval"), + (NaiveDate::from_ymd_res(2030, 3, 5)?, "Día de Carnaval"), + ( + NaiveDate::from_ymd_res(2030, 3, 24)?, + "Día Nacional de la Memoria por la Verdad y la Justicia", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 2)?, + "Día del Veterano y de los Caidos en la Guerra de Malvinas", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2030, 5, 25)?, + "Día de la Revolución de Mayo", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 20)?, + "Paso a la Inmortalidad del General Don Manuel Belgrano", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 9)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "Inmaculada Concepción de María", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2030, 6, 17)?, + "Paso a la Inmortalidad del General Don Martín Miguel de Güemes", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 17)?, + "Paso a la Inmortalidad del General Don José de San Martin", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 12)?, + "Día del Respeto a la Diversidad Cultural", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 18)?, + "Día de la Soberanía Nacional (observado)", + ), + ], + &mut map, + Country::AR, + "Argentina", + ); + + Ok(map) +} diff --git a/src/data/at.rs b/src/data/at.rs new file mode 100644 index 0000000..634af80 --- /dev/null +++ b/src/data/at.rs @@ -0,0 +1,727 @@ +//! Austria +use super::*; + +/// Generate holiday map for Austria. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2000, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2001, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2002, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2003, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2004, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2005, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2006, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2007, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Ostermontag"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Christi Himmelfahrt; Staatsfeiertag", + ), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2008, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2009, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2010, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2011, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2012, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2014, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2015, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2016, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2017, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2018, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2019, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2020, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2021, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2022, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2023, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2024, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2025, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2026, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2027, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2028, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2029, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 10, 26)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2030, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christtag"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Stefanitag"), + ], + &mut map, + Country::AT, + "Austria", + ); + + Ok(map) +} diff --git a/src/data/au.rs b/src/data/au.rs new file mode 100644 index 0000000..30f284e --- /dev/null +++ b/src/data/au.rs @@ -0,0 +1,545 @@ +//! Australia +use super::*; + +/// Generate holiday map for Australia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2000, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2001, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2002, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2004, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2005, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2006, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2006, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2007, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2009, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2010, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "ANZAC Day; Easter Monday", + ), + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2012, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2012, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2013, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2014, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2015, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2016, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2017, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2017, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2018, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2019, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2020, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2021, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2022, 9, 22)?, + "National Day of Mourning for Queen Elizabeth II", + ), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2023, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2023, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2024, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2025, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2026, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2027, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2028, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2029, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 1, 26)?, "Australia Day"), + (NaiveDate::from_ymd_res(2030, 4, 25)?, "ANZAC Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::AU, + "Australia", + ); + + Ok(map) +} diff --git a/src/data/aw.rs b/src/data/aw.rs new file mode 100644 index 0000000..c83cc14 --- /dev/null +++ b/src/data/aw.rs @@ -0,0 +1,1037 @@ +//! Aruba +use super::*; + +/// Generate holiday map for Aruba. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2000, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2000, 3, 6)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2000, 4, 29)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2001, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2001, 2, 26)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2001, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2002, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2002, 2, 11)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2002, 4, 1)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2002, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2003, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2003, 3, 3)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2003, 4, 21)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2003, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2004, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2004, 2, 23)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2004, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2005, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2005, 2, 7)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2005, 3, 28)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2005, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2006, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2006, 2, 27)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2006, 4, 17)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2006, 4, 29)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2007, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2007, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2008, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2008, 2, 4)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2008, 4, 30)?, "Aña di La Reina"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Dia di Asuncion; Dia di Obrero", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2009, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2009, 2, 23)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2009, 4, 13)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2009, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2010, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2010, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2011, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2011, 3, 7)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2011, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2012, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2012, 2, 20)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2012, 4, 9)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2012, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2013, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2013, 2, 11)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2013, 4, 1)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2013, 4, 30)?, "Aña di La Reina"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2014, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2014, 3, 3)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2014, 4, 26)?, "Aña di Rey"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2015, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2015, 4, 6)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2015, 4, 27)?, "Aña di Rey"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2016, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2016, 2, 8)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2016, 3, 28)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2016, 4, 27)?, "Aña di Rey"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2017, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2017, 2, 27)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2017, 4, 27)?, "Aña di Rey"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2018, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2018, 2, 12)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2018, 4, 2)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2018, 4, 27)?, "Aña di Rey"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2019, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2019, 3, 4)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2019, 4, 27)?, "Aña di Rey"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2020, 2, 24)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2020, 4, 13)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2020, 4, 27)?, "Aña di Rey"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2021, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2021, 4, 5)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2021, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2022, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2022, 2, 28)?, + "Dialuna despues di Carnaval Grandi", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2022, 4, 18)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2022, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2023, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2023, 2, 20)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2023, 4, 10)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2023, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2024, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2024, 2, 12)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2024, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2025, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2025, 3, 3)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2025, 4, 26)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2026, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2026, 4, 6)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2026, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2027, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2027, 3, 29)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2027, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2028, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2028, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2029, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2029, 2, 12)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2029, 4, 2)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2029, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Aña Nobo"), + (NaiveDate::from_ymd_res(2030, 1, 25)?, "Dia di Betico"), + ( + NaiveDate::from_ymd_res(2030, 3, 4)?, + "Dialuna prome cu diaranson di shinish", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 18)?, + "Dia di Himno y Bandera", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Bierna Santo"), + ( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Di dos dia di Pasco di Resureccion", + ), + (NaiveDate::from_ymd_res(2030, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Dia di Asuncion"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Pasco di Nacemento"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Di dos dia di Pasco di Nacemento", + ), + ], + &mut map, + Country::AW, + "Aruba", + ); + + Ok(map) +} diff --git a/src/data/az.rs b/src/data/az.rs new file mode 100644 index 0000000..4a2f9d2 --- /dev/null +++ b/src/data/az.rs @@ -0,0 +1,1976 @@ +//! Azerbaijan +use super::*; + +/// Generate holiday map for Azerbaijan. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2000, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2000, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2000, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2000, 3, 21)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2000, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2000, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2000, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 18)?, + "Milli Müstəqillik Günü", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Qurban bayrami (təxmini)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2001, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2001, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2001, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2001, 3, 21)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2001, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2001, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2001, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 18)?, + "Milli Müstəqillik Günü", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "Qurban bayrami (təxmini)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2002, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2002, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2002, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2002, 3, 21)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2002, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2002, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 18)?, + "Milli Müstəqillik Günü", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2002, 12, 4)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2002, 2, 21)?, "Qurban bayrami"), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2003, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2003, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2003, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2003, 3, 21)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2003, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2003, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2003, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 18)?, + "Milli Müstəqillik Günü", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "Qurban bayrami"), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2004, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2004, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2004, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2004, 3, 21)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2004, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2004, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2004, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 18)?, + "Milli Müstəqillik Günü", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "Qurban bayrami"), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2005, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2005, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2005, 3, 21)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2005, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2005, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2005, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 18)?, + "Milli Müstəqillik Günü", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2005, 1, 22)?, "Qurban bayrami"), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2006, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2006, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2006, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2006, 3, 21)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2006, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2006, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2006, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü; Qurban bayrami", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 3)?, + "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)", + ), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2006, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 29)?, + "Respublika Günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2007, + vec![ + + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Qurban bayrami; Yeni il bayramı"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2007, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2007, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2007, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2007, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2007, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2007, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2007, 3, 24)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2007, 5, 9)?, "Faşizm üzərində qələbə günü"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Respublika Günü"), + (NaiveDate::from_ymd_res(2007, 6, 15)?, "Azərbaycan xalqının milli qurtuluş günü"), + (NaiveDate::from_ymd_res(2007, 6, 26)?, "Azərbaycan Respublikasının Silahlı Qüvvələri günü"), + (NaiveDate::from_ymd_res(2007, 12, 31)?, "Dünya azərbaycanlılarının həmrəyliyi günü"), + (NaiveDate::from_ymd_res(2007, 1, 3)?, "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur); Qurban bayrami (müşahidə olunur)"), + (NaiveDate::from_ymd_res(2007, 10, 12)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2007, 12, 21)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2007, 3, 26)?, "Novruz bayramı (müşahidə olunur)"), + (NaiveDate::from_ymd_res(2007, 10, 15)?, "Ramazan bayrami (müşahidə olunur)"), + (NaiveDate::from_ymd_res(2007, 1, 4)?, "Qurban bayrami (müşahidə olunur)"), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2008, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2008, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2008, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2008, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2008, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2008, 9, 30)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2008, 12, 9)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2008, 3, 10)?, + "Qadınlar günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 16)?, + "Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2009, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2009, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2009, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2009, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2009, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2009, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2009, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2009, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2009, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2009, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2009, 11, 28)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "Qadınlar günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 11)?, + "Faşizm üzərində qələbə günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 22)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 30)?, + "Qurban bayrami (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2010, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2010, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2010, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2010, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2010, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2010, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2010, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2010, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2010, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2010, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2010, 9, 9)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2010, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 10)?, + "Faşizm üzərində qələbə günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 28)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2011, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2011, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2011, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2011, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2011, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2011, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2011, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2011, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2011, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2011, 8, 31)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2011, 11, 7)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 30)?, + "Respublika Günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 27)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 8)?, + "Qurban bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 29)?, + "İstirahət günü (27.08.2011 ilə əvəz edilmişdir)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2012, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2012, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2012, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2012, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2012, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2012, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2012, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2012, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2012, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 3)?, + "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)", + ), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2012, 8, 20)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2012, 10, 25)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2012, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 21)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2013, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2013, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2013, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2013, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2013, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2013, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2013, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2013, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2013, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2013, 8, 9)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2013, 10, 16)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2013, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 17)?, + "Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 11)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 3)?, + "İstirahət günü (29.12.2012 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 4)?, + "İstirahət günü (30.12.2012 ilə əvəz edilmişdir)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2014, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2014, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2014, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2014, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2014, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2014, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2014, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2014, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2014, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2014, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2014, 7, 29)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2014, 10, 5)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2014, 3, 10)?, + "Qadınlar günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 16)?, + "Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "Qurban bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 7)?, + "Qurban bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 10)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 3)?, + "İstirahət günü (28.12.2013 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "İstirahət günü (29.12.2013 ilə əvəz edilmişdir)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2015, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2015, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2015, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2015, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2015, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2015, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2015, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2015, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2015, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2015, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2015, 7, 18)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2015, 9, 25)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2015, 3, 9)?, + "Qadınlar günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 11)?, + "Faşizm üzərində qələbə günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 20)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2016, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2016, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2016, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2016, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2016, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2016, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2016, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2016, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2016, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2016, 7, 7)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2016, 9, 13)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2016, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 30)?, + "Respublika Günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 27)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2017, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2017, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2017, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2017, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2017, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2017, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2017, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2017, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2017, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2017, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü; Ramazan bayrami", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 3)?, + "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)", + ), + (NaiveDate::from_ymd_res(2017, 6, 27)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2017, 9, 2)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2017, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 29)?, + "Respublika Günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 4)?, + "Qurban bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 28)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2018, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2018, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2018, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2018, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2018, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2018, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2018, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2018, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2018, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü; Ramazan bayrami", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 3)?, + "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)", + ), + (NaiveDate::from_ymd_res(2018, 6, 16)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2018, 8, 23)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2018, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 18)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 19)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 11)?, + "Prezidenti seçkiləri", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2019, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2019, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2019, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2019, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2019, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2019, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2019, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2019, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2019, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2019, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2019, 6, 6)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2019, 8, 12)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2019, 8, 13)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2019, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 17)?, + "Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 11)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 27)?, + "Bələdiyyə seçkiləri", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2020, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2020, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2020, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2020, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2020, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2020, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2020, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2020, 5, 28)?, "Respublika Günü"), + ( + NaiveDate::from_ymd_res(2020, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2020, 8, 1)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2020, 3, 9)?, + "Qadınlar günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 11)?, + "Faşizm üzərində qələbə günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 26)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 3)?, + "Qurban bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 27)?, + "İstirahət günü (29.03.2020 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 27)?, + "İstirahət günü (30.05.2020 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 3)?, + "İstirahət günü (28.12.2019 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 6)?, + "İstirahət günü (29.12.2019 ilə əvəz edilmişdir)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2021, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2021, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2021, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2021, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2021, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2021, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2021, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2021, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2021, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2021, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2021, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2021, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2021, 5, 14)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2021, 7, 21)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2021, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 10)?, + "Faşizm üzərində qələbə günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 28)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 11)?, + "İstirahət günü (08.05.2021 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 12)?, + "İstirahət günü (16.05.2021 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 19)?, + "İstirahət günü (17.07.2021 ilə əvəz edilmişdir)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2022, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2022, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2022, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2022, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2022, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2022, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2022, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2022, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2022, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2022, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2022, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 30)?, + "Müstəqillik Günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 27)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "Qurban bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 12)?, + "Qurban bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 7)?, + "İstirahət günü (05.03.2022 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 7)?, + "İstirahət günü (05.11.2022 ilə əvəz edilmişdir)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2023, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2023, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2023, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2023, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2023, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2023, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2023, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2023, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2023, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2023, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2023, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 3)?, + "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)", + ), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "Qurban bayrami"), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "Qurban bayrami"), + ( + NaiveDate::from_ymd_res(2023, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Ramazan bayrami (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 29)?, + "Müstəqillik Günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 27)?, + "İstirahət günü (24.06.2023 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 30)?, + "İstirahət günü (25.06.2023 ilə əvəz edilmişdir)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 10)?, + "İstirahət günü (04.11.2023 ilə əvəz edilmişdir)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2024, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2024, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2024, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2024, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2024, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2024, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2024, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2024, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2024, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2024, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2024, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2024, 1, 3)?, + "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)", + ), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Ramazan bayrami"), + (NaiveDate::from_ymd_res(2024, 4, 11)?, "Ramazan bayrami"), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 19)?, + "Qurban bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 11)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2025, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2025, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2025, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2025, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2025, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2025, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2025, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2025, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2025, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2025, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2025, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2025, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 10)?, + "Qadınlar günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "Ramazan bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 9)?, + "Qurban bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 16)?, + "Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 10)?, + "Zəfər Günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 11)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2026, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2026, 3, 8)?, "Qadınlar günü"), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Novruz bayramı; Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "Novruz bayramı; Ramazan bayrami (təxmini)", + ), + (NaiveDate::from_ymd_res(2026, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2026, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2026, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2026, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "Müstəqillik Günü; Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2026, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2026, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 9)?, + "Qadınlar günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 25)?, + "Novruz bayramı (müşahidə olunur); Ramazan bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 11)?, + "Faşizm üzərində qələbə günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 10)?, + "Zəfər Günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2027, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2027, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2027, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2027, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2027, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2027, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2027, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2027, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2027, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2027, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2027, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 10)?, + "Faşizm üzərində qələbə günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 18)?, + "Qurban bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 28)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2028, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2028, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2028, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2028, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2028, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2028, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2028, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2028, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2028, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2028, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 4)?, + "Yeni il bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Ramazan bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 29)?, + "Ramazan bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 8)?, + "Qurban bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 29)?, + "Müstəqillik Günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2029, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2029, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2029, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2029, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2029, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2029, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2029, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2029, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2029, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2029, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2029, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2029, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2029, 1, 3)?, + "Dünya azərbaycanlılarının həmrəyliyi günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Yeni il bayramı"), + (NaiveDate::from_ymd_res(2030, 1, 20)?, "Ümumxalq hüzn günü"), + (NaiveDate::from_ymd_res(2030, 3, 8)?, "Qadınlar günü"), + (NaiveDate::from_ymd_res(2030, 3, 20)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2030, 3, 21)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2030, 3, 22)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2030, 3, 23)?, "Novruz bayramı"), + (NaiveDate::from_ymd_res(2030, 3, 24)?, "Novruz bayramı"), + ( + NaiveDate::from_ymd_res(2030, 5, 9)?, + "Faşizm üzərində qələbə günü", + ), + (NaiveDate::from_ymd_res(2030, 5, 28)?, "Müstəqillik Günü"), + ( + NaiveDate::from_ymd_res(2030, 6, 15)?, + "Azərbaycan xalqının milli qurtuluş günü", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 26)?, + "Azərbaycan Respublikasının Silahlı Qüvvələri günü", + ), + (NaiveDate::from_ymd_res(2030, 11, 8)?, "Zəfər Günü"), + ( + NaiveDate::from_ymd_res(2030, 11, 9)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 31)?, + "Dünya azərbaycanlılarının həmrəyliyi günü", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Ramazan bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "Qurban bayrami (təxmini)", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 25)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 26)?, + "Novruz bayramı (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "Qurban bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 16)?, + "Qurban bayrami (müşahidə olunur, təxmini)", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 17)?, + "Azərbaycan xalqının milli qurtuluş günü (müşahidə olunur)", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 11)?, + "Azərbaycan Respublikasının Dövlət bayrağı günü (müşahidə olunur)", + ), + ], + &mut map, + Country::AZ, + "Azerbaijan", + ); + + Ok(map) +} diff --git a/src/data/ba.rs b/src/data/ba.rs new file mode 100644 index 0000000..3c6fae2 --- /dev/null +++ b/src/data/ba.rs @@ -0,0 +1,1053 @@ +//! Bosnia and Herzegovina +use super::*; + +/// Generate holiday map for Bosnia and Herzegovina. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 4, 28)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2000, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 4, 13)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2001, 12, 17)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2001, 3, 6)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2001, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 5, 3)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 1)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2002, 12, 6)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2002, 2, 23)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2002, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 4, 25)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 21)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2003, 11, 26)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2003, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 4, 9)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2004, 2, 2)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2004, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 4, 29)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 28)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2005, 11, 4)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2005, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 4, 21)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 17)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2006, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 4, 6)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2007, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 4, 25)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2008, 10, 2)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2008, 12, 9)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2008, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 4, 17)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 13)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2009, 11, 28)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2009, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 4, 2)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2010, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 4, 22)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2011, 8, 31)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2011, 11, 7)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2011, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 4, 13)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 9)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2012, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 5, 3)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 1)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2013, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 4, 18)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2014, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 4, 10)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 6)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2015, 7, 18)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2015, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 4, 29)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 28)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2016, 7, 7)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2016, 9, 13)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2016, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 4, 14)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2017, 6, 26)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2017, 9, 2)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2017, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 4, 6)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 2)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 4, 26)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2019, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 4, 17)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 13)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2020, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 4, 30)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 5)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2021, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 4, 22)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 18)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Međunarodni praznik rada; Ramazanski Bajram", + ), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2022, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 4, 14)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 10)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "Ramazanski Bajram"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "Kurban Bajram"), + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2023, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 5, 3)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Uskrsni ponedjeljak (Katolički)", + ), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Ramazanski Bajram"), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 4, 18)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2025, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 4, 10)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 6)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2026, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 4, 30)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 29)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2027, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 4, 14)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2028, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 4, 6)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 2)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 4, 26)?, + "Veliki petak (Pravoslavni)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Uskrsni ponedjeljak (Katolički)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Ramazanski Bajram (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Kurban Bajram (estimated)", + ), + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Nova godina"), + (NaiveDate::from_ymd_res(2030, 1, 7)?, "Božić (Pravoslavni)"), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Međunarodni praznik rada", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 2)?, + "Međunarodni praznik rada", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Božić (Katolički)"), + ], + &mut map, + Country::BA, + "Bosnia and Herzegovina", + ); + + Ok(map) +} diff --git a/src/data/bd.rs b/src/data/bd.rs new file mode 100644 index 0000000..23f7981 --- /dev/null +++ b/src/data/bd.rs @@ -0,0 +1,911 @@ +//! Bangladesh +use super::*; + +/// Generate holiday map for Bangladesh. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2000, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2000, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2000, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2001, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2001, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2002, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2002, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2002, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2003, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2003, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2003, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2004, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2004, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2005, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2005, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2005, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2006, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2006, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2006, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2007, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2007, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2007, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2008, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2008, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2009, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2009, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2009, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2010, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2010, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2011, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2011, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2011, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2012, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2012, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2012, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2013, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2013, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2013, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2014, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2014, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2014, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2015, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2015, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2015, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2016, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2016, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2016, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2017, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2017, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2017, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2018, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2018, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2018, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2019, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2019, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2019, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2020, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2020, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2020, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2021, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2021, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2022, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2022, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2022, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2023, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2023, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2023, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2024, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2024, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2024, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2025, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2025, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2025, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2026, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2026, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2026, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2027, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2028, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2028, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2028, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2029, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2029, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2029, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 2, 21)?, + "International Mother's language Day", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 17)?, + "Sheikh Mujibur Rahman's Birthday and Children's Day", + ), + (NaiveDate::from_ymd_res(2030, 3, 26)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "Bengali New Year's Day", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "May Day"), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "National Mourning Day", + ), + (NaiveDate::from_ymd_res(2030, 12, 16)?, "Victory Day"), + ], + &mut map, + Country::BD, + "Bangladesh", + ); + + Ok(map) +} diff --git a/src/data/be.rs b/src/data/be.rs new file mode 100644 index 0000000..ddb3d55 --- /dev/null +++ b/src/data/be.rs @@ -0,0 +1,696 @@ +//! Belgium +use super::*; + +/// Generate holiday map for Belgium. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Ostern"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2000, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2000, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Ostern"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2001, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2001, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Ostern"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2002, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2002, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Ostern"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2003, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2003, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Ostern"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2004, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2004, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Ostern"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2005, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2005, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Ostern"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2006, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2006, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Ostern"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2007, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2007, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Ostern"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Ostermontag"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Christi Himmelfahrt; Tag der Arbeit", + ), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2008, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2008, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Ostern"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2009, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2009, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Ostern"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2010, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2010, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Ostern"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2011, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2011, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Ostern"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2012, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2012, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Ostern"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2013, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2013, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Ostern"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2014, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2014, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Ostern"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2015, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2015, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Ostern"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2016, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2016, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Ostern"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2017, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2017, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Ostern"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2018, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2018, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Ostern"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2019, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2019, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Ostern"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2020, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2020, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Ostern"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2021, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2021, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Ostern"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2022, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2022, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Ostern"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2023, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2023, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Ostern"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2024, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2024, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Ostern"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2025, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2025, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Ostern"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2026, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2026, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Ostern"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2027, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2027, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Ostern"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2028, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2028, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Ostern"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2029, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2029, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Ostern"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pfingsten"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2030, 7, 21)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2030, 11, 11)?, "Waffenstillstand"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::BE, + "Belgium", + ); + + Ok(map) +} diff --git a/src/data/bg.rs b/src/data/bg.rs new file mode 100644 index 0000000..c0460bb --- /dev/null +++ b/src/data/bg.rs @@ -0,0 +1,818 @@ +//! Bulgaria +use super::*; + +/// Generate holiday map for Bulgaria. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2000, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2000, 4, 28)?, "Велики петък"), + (NaiveDate::from_ymd_res(2000, 4, 29)?, "Велика събота"), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "Великден"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Великден; Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2000, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2000, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2000, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2000, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2001, + vec![ + + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2001, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Велики петък"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "Велика събота"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Великден"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Великден"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2001, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2001, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2001, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2002, + vec![ + + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2002, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "Велики петък"), + (NaiveDate::from_ymd_res(2002, 5, 4)?, "Велика събота"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Великден"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "Великден; Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2002, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2002, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2002, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2003, + vec![ + + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2003, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "Велики петък"), + (NaiveDate::from_ymd_res(2003, 4, 26)?, "Велика събота"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Великден"), + (NaiveDate::from_ymd_res(2003, 4, 28)?, "Великден"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2003, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2003, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2003, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2003, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2004, + vec![ + + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2004, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Велики петък"), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "Велика събота"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Великден"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Великден"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2004, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2004, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2004, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2004, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2005, + vec![ + + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2005, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2005, 4, 29)?, "Велики петък"), + (NaiveDate::from_ymd_res(2005, 4, 30)?, "Велика събота"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Великден; Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "Великден"), + (NaiveDate::from_ymd_res(2005, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2005, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2005, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2005, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2006, + vec![ + + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2006, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "Велики петък"), + (NaiveDate::from_ymd_res(2006, 4, 22)?, "Велика събота"), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "Великден"), + (NaiveDate::from_ymd_res(2006, 4, 24)?, "Великден"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2006, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2006, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2006, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2006, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2007, + vec![ + + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2007, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Велики петък"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "Велика събота"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Великден"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Великден"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2007, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2007, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2007, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2007, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2008, + vec![ + + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2008, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "Велики петък"), + (NaiveDate::from_ymd_res(2008, 4, 26)?, "Велика събота"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Великден"), + (NaiveDate::from_ymd_res(2008, 4, 28)?, "Великден"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2008, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2008, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2008, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2008, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2009, + vec![ + + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2009, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2009, 4, 17)?, "Велики петък"), + (NaiveDate::from_ymd_res(2009, 4, 18)?, "Велика събота"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "Великден"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "Великден"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2009, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2009, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2009, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2009, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2010, + vec![ + + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2010, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Велики петък"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "Велика събота"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Великден"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Великден"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2010, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2010, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2010, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2011, + vec![ + + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2011, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Велики петък"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "Велика събота"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Великден"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Великден"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2011, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2011, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2011, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2011, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2012, + vec![ + + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2012, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2012, 4, 13)?, "Велики петък"), + (NaiveDate::from_ymd_res(2012, 4, 14)?, "Велика събота"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "Великден"), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "Великден"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2012, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2012, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2012, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2012, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2013, + vec![ + + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2013, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2013, 5, 3)?, "Велики петък"), + (NaiveDate::from_ymd_res(2013, 5, 4)?, "Велика събота"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Великден"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "Великден; Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2013, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2013, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2013, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2014, + vec![ + + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Велики петък"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "Велика събота"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Великден"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Великден"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2014, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2014, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2014, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2014, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2015, + vec![ + + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2015, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2015, 4, 10)?, "Велики петък"), + (NaiveDate::from_ymd_res(2015, 4, 11)?, "Велика събота"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "Великден"), + (NaiveDate::from_ymd_res(2015, 4, 13)?, "Великден"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2015, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2015, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2015, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2016, + vec![ + + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2016, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "Велики петък"), + (NaiveDate::from_ymd_res(2016, 4, 30)?, "Велика събота"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Великден; Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "Великден"), + (NaiveDate::from_ymd_res(2016, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2016, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2016, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2016, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Рождество Христово"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2017, + vec![ + + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2017, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Велики петък"), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "Велика събота"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Великден"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Великден"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2017, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2017, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2017, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2017, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Нова година (почивен ден)"), + (NaiveDate::from_ymd_res(2017, 5, 8)?, "Гергьовден, Ден на храбростта и Българската армия (почивен ден)"), + (NaiveDate::from_ymd_res(2017, 12, 27)?, "Бъдни вечер (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2018, + vec![ + + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2018, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "Велики петък"), + (NaiveDate::from_ymd_res(2018, 4, 7)?, "Велика събота"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "Великден"), + (NaiveDate::from_ymd_res(2018, 4, 9)?, "Великден"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2018, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2018, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2018, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2018, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2018, 3, 5)?, "Ден на Освобождението на България от османско иго (почивен ден)"), + (NaiveDate::from_ymd_res(2018, 5, 7)?, "Гергьовден, Ден на храбростта и Българската армия (почивен ден)"), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "Ден на Независимостта на България (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2019, + vec![ + + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2019, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "Велики петък"), + (NaiveDate::from_ymd_res(2019, 4, 27)?, "Велика събота"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "Великден"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "Великден"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2019, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2019, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2019, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2019, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2019, 3, 4)?, "Ден на Освобождението на България от османско иго (почивен ден)"), + (NaiveDate::from_ymd_res(2019, 9, 23)?, "Ден на Независимостта на България (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2020, + vec![ + + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2020, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2020, 4, 17)?, "Велики петък"), + (NaiveDate::from_ymd_res(2020, 4, 18)?, "Велика събота"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "Великден"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "Великден"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2020, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2020, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2020, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност (почивен ден)"), + (NaiveDate::from_ymd_res(2020, 9, 7)?, "Ден на Съединението (почивен ден)"), + (NaiveDate::from_ymd_res(2020, 12, 28)?, "Рождество Христово (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2021, + vec![ + + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2021, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "Велики петък"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Велика събота; Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Великден"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "Великден"), + (NaiveDate::from_ymd_res(2021, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2021, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2021, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2021, 5, 4)?, "Ден на труда и на международната работническа солидарност (почивен ден)"), + (NaiveDate::from_ymd_res(2021, 12, 27)?, "Рождество Христово (почивен ден)"), + (NaiveDate::from_ymd_res(2021, 12, 28)?, "Рождество Христово (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2022, + vec![ + + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2022, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "Велики петък"), + (NaiveDate::from_ymd_res(2022, 4, 23)?, "Велика събота"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "Великден"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "Великден"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2022, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2022, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2022, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2022, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2022, 1, 3)?, "Нова година (почивен ден)"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Ден на труда и на международната работническа солидарност (почивен ден)"), + (NaiveDate::from_ymd_res(2022, 12, 27)?, "Бъдни вечер (почивен ден)"), + (NaiveDate::from_ymd_res(2022, 12, 28)?, "Рождество Христово (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2023, + vec![ + + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2023, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "Велики петък"), + (NaiveDate::from_ymd_res(2023, 4, 15)?, "Велика събота"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "Великден"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "Великден"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2023, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2023, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2023, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2023, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Нова година (почивен ден)"), + (NaiveDate::from_ymd_res(2023, 5, 8)?, "Гергьовден, Ден на храбростта и Българската армия (почивен ден)"), + (NaiveDate::from_ymd_res(2023, 12, 27)?, "Бъдни вечер (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2024, + vec![ + + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2024, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "Велики петък"), + (NaiveDate::from_ymd_res(2024, 5, 4)?, "Велика събота"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "Великден"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "Великден; Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2024, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2024, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2024, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2024, 3, 4)?, "Ден на Освобождението на България от османско иго (почивен ден)"), + (NaiveDate::from_ymd_res(2024, 9, 23)?, "Ден на Независимостта на България (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2025, + vec![ + + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Велики петък"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "Велика събота"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Великден"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Великден"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2025, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2025, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2025, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2025, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2025, 5, 26)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност (почивен ден)"), + (NaiveDate::from_ymd_res(2025, 9, 8)?, "Ден на Съединението (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2026, + vec![ + + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2026, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2026, 4, 10)?, "Велики петък"), + (NaiveDate::from_ymd_res(2026, 4, 11)?, "Велика събота"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "Великден"), + (NaiveDate::from_ymd_res(2026, 4, 13)?, "Великден"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2026, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2026, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2026, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност (почивен ден)"), + (NaiveDate::from_ymd_res(2026, 9, 7)?, "Ден на Съединението (почивен ден)"), + (NaiveDate::from_ymd_res(2026, 12, 28)?, "Рождество Христово (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2027, + vec![ + + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2027, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2027, 4, 30)?, "Велики петък"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Велика събота; Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "Великден"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "Великден"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2027, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2027, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2027, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2027, 5, 4)?, "Ден на труда и на международната работническа солидарност (почивен ден)"), + (NaiveDate::from_ymd_res(2027, 12, 27)?, "Рождество Христово (почивен ден)"), + (NaiveDate::from_ymd_res(2027, 12, 28)?, "Рождество Христово (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2028, + vec![ + + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2028, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Велики петък"), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "Велика събота"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Великден"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Великден"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2028, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2028, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2028, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2028, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2028, 1, 3)?, "Нова година (почивен ден)"), + (NaiveDate::from_ymd_res(2028, 5, 8)?, "Гергьовден, Ден на храбростта и Българската армия (почивен ден)"), + (NaiveDate::from_ymd_res(2028, 12, 27)?, "Бъдни вечер (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2029, + vec![ + + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2029, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "Велики петък"), + (NaiveDate::from_ymd_res(2029, 4, 7)?, "Велика събота"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "Великден"), + (NaiveDate::from_ymd_res(2029, 4, 9)?, "Великден"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2029, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2029, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2029, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2029, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2029, 3, 5)?, "Ден на Освобождението на България от османско иго (почивен ден)"), + (NaiveDate::from_ymd_res(2029, 5, 7)?, "Гергьовден, Ден на храбростта и Българската армия (почивен ден)"), + (NaiveDate::from_ymd_res(2029, 9, 24)?, "Ден на Независимостта на България (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + build_year( + years, + 2030, + vec![ + + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2030, 3, 3)?, "Ден на Освобождението на България от османско иго"), + (NaiveDate::from_ymd_res(2030, 4, 26)?, "Велики петък"), + (NaiveDate::from_ymd_res(2030, 4, 27)?, "Велика събота"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "Великден"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "Великден"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Ден на труда и на международната работническа солидарност"), + (NaiveDate::from_ymd_res(2030, 5, 6)?, "Гергьовден, Ден на храбростта и Българската армия"), + (NaiveDate::from_ymd_res(2030, 5, 24)?, "Ден на светите братя Кирил и Методий, на българската азбука, просвета и култура и на славянската книжовност"), + (NaiveDate::from_ymd_res(2030, 9, 6)?, "Ден на Съединението"), + (NaiveDate::from_ymd_res(2030, 9, 22)?, "Ден на Независимостта на България"), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Бъдни вечер"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Рождество Христово"), + (NaiveDate::from_ymd_res(2030, 3, 4)?, "Ден на Освобождението на България от османско иго (почивен ден)"), + (NaiveDate::from_ymd_res(2030, 9, 23)?, "Ден на Независимостта на България (почивен ден)"), + ], + &mut map, + Country::BG, + "Bulgaria", + ); + + Ok(map) +} diff --git a/src/data/bi.rs b/src/data/bi.rs new file mode 100644 index 0000000..026d0a1 --- /dev/null +++ b/src/data/bi.rs @@ -0,0 +1,1443 @@ +//! Burundi +use super::*; + +/// Generate holiday map for Burundi. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2000, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2000, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2001, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2001, 7, 1)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2001, 7, 2)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2001, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 21)?, + "President Ndadaye's Day", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 22)?, + "President Ndadaye's Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Eid ul Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2002, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2002, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2002, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 14)?, + "Prince Louis Rwagasore Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 22)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2003, 4, 6)?, + "President Ntaryamira Day", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 7)?, + "President Ntaryamira Day (observed)", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2003, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2003, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 11)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2004, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2004, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2004, 8, 16)?, + "Assumption Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Eid ul Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 1)?, + "Eid al Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "Eid al Adha (estimated) (observed)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2005, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2005, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2005, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 3)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 21)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 2, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2006, 2, 6)?, "Unity Day (observed)"), + ( + NaiveDate::from_ymd_res(2006, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2006, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 23)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 10)?, + "Eid al Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2007, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2007, 7, 1)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2007, 7, 2)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2007, 10, 13)?, + "Eid ul Fitr (estimated); Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 21)?, + "President Ndadaye's Day", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 22)?, + "President Ndadaye's Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2007, 12, 20)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2008, 4, 6)?, + "President Ntaryamira Day", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 7)?, + "President Ntaryamira Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Ascension Day; Labour Day", + ), + (NaiveDate::from_ymd_res(2008, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2009, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2009, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2009, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "All Saints' Day"), + ( + NaiveDate::from_ymd_res(2009, 11, 2)?, + "All Saints' Day (observed)", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2009, 9, 20)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "Eid ul Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2010, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2010, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2010, 8, 16)?, + "Assumption Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 9, 10)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 16)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2011, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2011, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2011, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "Eid al Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "Eid al Adha (estimated) (observed)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 2, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2012, 2, 6)?, "Unity Day (observed)"), + ( + NaiveDate::from_ymd_res(2012, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2012, 7, 1)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2012, 7, 2)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2012, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 21)?, + "President Ndadaye's Day", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 22)?, + "President Ndadaye's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2012, 8, 19)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Eid ul Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 26)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2013, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2013, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2013, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 14)?, + "Prince Louis Rwagasore Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2013, 8, 8)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 15)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2014, 4, 6)?, + "President Ntaryamira Day", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 7)?, + "President Ntaryamira Day (observed)", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2014, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2014, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2014, 7, 28)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 4)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2015, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2015, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2015, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "All Saints' Day"), + ( + NaiveDate::from_ymd_res(2015, 11, 2)?, + "All Saints' Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2015, 7, 17)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 23)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2016, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2016, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 6)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 11)?, + "Eid al Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "Eid al Adha (estimated) (observed)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 2, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2017, 2, 6)?, "Unity Day (observed)"), + ( + NaiveDate::from_ymd_res(2017, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2017, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2017, 6, 25)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Eid ul Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 1)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2018, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2018, 7, 1)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2018, 7, 2)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2018, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 21)?, + "President Ndadaye's Day", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 22)?, + "President Ndadaye's Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2018, 6, 15)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 21)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2019, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2019, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Prince Louis Rwagasore Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2019, 6, 4)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 11)?, + "Eid al Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "Eid al Adha (estimated) (observed)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2020, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2020, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "All Saints' Day"), + ( + NaiveDate::from_ymd_res(2020, 11, 2)?, + "All Saints' Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2020, 5, 24)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Eid ul Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 31)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2021, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Ascension Day; Eid ul Fitr (estimated)", + ), + (NaiveDate::from_ymd_res(2021, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2021, 8, 16)?, + "Assumption Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2022, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Eid ul Fitr (estimated); Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2022, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2022, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 9)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 2, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2023, 2, 6)?, "Unity Day (observed)"), + ( + NaiveDate::from_ymd_res(2023, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2023, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2023, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2023, 4, 21)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 28)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2024, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2024, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2024, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Prince Louis Rwagasore Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2024, 4, 10)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Eid al Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Eid al Adha (estimated) (observed)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2025, 4, 6)?, + "President Ntaryamira Day", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 7)?, + "President Ntaryamira Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2025, 6, 8)?, + "President Nkurunziza Day", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 9)?, + "President Nkurunziza Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Eid ul Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2026, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2026, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2026, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "All Saints' Day"), + ( + NaiveDate::from_ymd_res(2026, 11, 2)?, + "All Saints' Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2027, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2027, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2027, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2027, 8, 16)?, + "Assumption Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Eid al Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Eid al Adha (estimated) (observed)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2028, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2028, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2028, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2029, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2029, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2029, 7, 1)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2029, 7, 2)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 21)?, + "President Ndadaye's Day", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 22)?, + "President Ndadaye's Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 2, 5)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2030, 4, 6)?, + "President Ntaryamira Day", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2030, 6, 8)?, + "President Nkurunziza Day", + ), + (NaiveDate::from_ymd_res(2030, 7, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Assumption Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 13)?, + "Prince Louis Rwagasore Day", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Prince Louis Rwagasore Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 21)?, + "President Ndadaye's Day", + ), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "All Saints' Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Eid ul Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Eid al Adha (estimated)", + ), + ], + &mut map, + Country::BI, + "Burundi", + ); + + Ok(map) +} diff --git a/src/data/bo.rs b/src/data/bo.rs new file mode 100644 index 0000000..3b35487 --- /dev/null +++ b/src/data/bo.rs @@ -0,0 +1,1119 @@ +//! Bolivia +use super::*; + +/// Generate holiday map for Bolivia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2000, 3, 6)?, "Carnaval"), + (NaiveDate::from_ymd_res(2000, 3, 7)?, "Carnaval"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2000, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 7)?, + "Día de la Independencia de Bolivia (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2001, 2, 26)?, "Carnaval"), + (NaiveDate::from_ymd_res(2001, 2, 27)?, "Carnaval"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2001, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2002, 2, 11)?, "Carnaval"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Carnaval"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2002, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2003, 3, 3)?, "Carnaval"), + (NaiveDate::from_ymd_res(2003, 3, 4)?, "Carnaval"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2003, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 2)?, + "Día de Todos los Difuntos", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 3)?, + "Día de Todos los Difuntos (observado)", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2004, 2, 23)?, "Carnaval"), + (NaiveDate::from_ymd_res(2004, 2, 24)?, "Carnaval"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2004, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2005, 2, 7)?, "Carnaval"), + (NaiveDate::from_ymd_res(2005, 2, 8)?, "Carnaval"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Día del Trabajo (observado)", + ), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2005, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Navidad (observado)", + ), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "Año Nuevo (observado)", + ), + (NaiveDate::from_ymd_res(2006, 2, 27)?, "Carnaval"), + (NaiveDate::from_ymd_res(2006, 2, 28)?, "Carnaval"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2006, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 7)?, + "Día de la Independencia de Bolivia (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Carnaval"), + (NaiveDate::from_ymd_res(2007, 2, 20)?, "Carnaval"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2007, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2008, 2, 4)?, "Carnaval"), + (NaiveDate::from_ymd_res(2008, 2, 5)?, "Carnaval"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2008, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 2)?, + "Día de Todos los Difuntos", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 3)?, + "Día de Todos los Difuntos (observado)", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2009, 2, 23)?, "Carnaval"), + (NaiveDate::from_ymd_res(2009, 2, 24)?, "Carnaval"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2009, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 22)?, + "Año Nuevo Aymara Amazónico (observado)", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2010, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Carnaval"), + (NaiveDate::from_ymd_res(2010, 2, 16)?, "Carnaval"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2010, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2011, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2011, 3, 7)?, "Carnaval"), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Carnaval"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Día del Trabajo (observado)", + ), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2011, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Navidad (observado)", + ), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "Año Nuevo (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 23)?, + "Día de la Creación del Estado Plurinacional de Bolivia (observado)", + ), + (NaiveDate::from_ymd_res(2012, 2, 20)?, "Carnaval"), + (NaiveDate::from_ymd_res(2012, 2, 21)?, "Carnaval"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 4, 30)?, + "Día del Trabajo (observado)", + ), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2012, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2013, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "Carnaval"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Carnaval"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2013, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2014, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Carnaval"), + (NaiveDate::from_ymd_res(2014, 3, 4)?, "Carnaval"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 5, 2)?, + "Día del Trabajo (observado)", + ), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2014, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 2)?, + "Día de Todos los Difuntos", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 3)?, + "Día de Todos los Difuntos (observado)", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2015, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2015, 2, 16)?, "Carnaval"), + (NaiveDate::from_ymd_res(2015, 2, 17)?, "Carnaval"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2015, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 22)?, + "Año Nuevo Aymara Amazónico (observado)", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2016, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Carnaval"), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "Carnaval"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Día del Trabajo (observado)", + ), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2016, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Navidad (observado)", + ), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "Año Nuevo (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 23)?, + "Día de la Creación del Estado Plurinacional de Bolivia (observado)", + ), + (NaiveDate::from_ymd_res(2017, 2, 27)?, "Carnaval"), + (NaiveDate::from_ymd_res(2017, 2, 28)?, "Carnaval"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2017, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 7)?, + "Día de la Independencia de Bolivia (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2018, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "Carnaval"), + (NaiveDate::from_ymd_res(2018, 2, 13)?, "Carnaval"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2018, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2019, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2019, 3, 4)?, "Carnaval"), + (NaiveDate::from_ymd_res(2019, 3, 5)?, "Carnaval"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2019, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2020, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2020, 2, 24)?, "Carnaval"), + (NaiveDate::from_ymd_res(2020, 2, 25)?, "Carnaval"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2020, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 22)?, + "Año Nuevo Aymara Amazónico (observado)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2021, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2021, 2, 15)?, "Carnaval"), + (NaiveDate::from_ymd_res(2021, 2, 16)?, "Carnaval"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2021, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2022, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2022, 2, 28)?, "Carnaval"), + (NaiveDate::from_ymd_res(2022, 3, 1)?, "Carnaval"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Día del Trabajo (observado)", + ), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2022, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Navidad (observado)", + ), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "Año Nuevo (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 23)?, + "Día de la Creación del Estado Plurinacional de Bolivia (observado)", + ), + (NaiveDate::from_ymd_res(2023, 2, 20)?, "Carnaval"), + (NaiveDate::from_ymd_res(2023, 2, 21)?, "Carnaval"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2023, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 7)?, + "Día de la Independencia de Bolivia (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2024, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "Carnaval"), + (NaiveDate::from_ymd_res(2024, 2, 13)?, "Carnaval"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2024, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2025, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Carnaval"), + (NaiveDate::from_ymd_res(2025, 3, 4)?, "Carnaval"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2025, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2026, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2026, 2, 16)?, "Carnaval"), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "Carnaval"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2026, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 22)?, + "Año Nuevo Aymara Amazónico (observado)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2027, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2027, 2, 8)?, "Carnaval"), + (NaiveDate::from_ymd_res(2027, 2, 9)?, "Carnaval"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2027, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2028, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2028, 2, 28)?, "Carnaval"), + (NaiveDate::from_ymd_res(2028, 2, 29)?, "Carnaval"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2028, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 7)?, + "Día de la Independencia de Bolivia (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2029, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "Carnaval"), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "Carnaval"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2029, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2030, 1, 22)?, + "Día de la Creación del Estado Plurinacional de Bolivia", + ), + (NaiveDate::from_ymd_res(2030, 3, 4)?, "Carnaval"), + (NaiveDate::from_ymd_res(2030, 3, 5)?, "Carnaval"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2030, 6, 21)?, + "Año Nuevo Aymara Amazónico", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 6)?, + "Día de la Independencia de Bolivia", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 17)?, + "Día de la Dignidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 2)?, + "Día de Todos los Difuntos", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ], + &mut map, + Country::BO, + "Bolivia", + ); + + Ok(map) +} diff --git a/src/data/br.rs b/src/data/br.rs new file mode 100644 index 0000000..2a03bae --- /dev/null +++ b/src/data/br.rs @@ -0,0 +1,975 @@ +//! Brazil +use super::*; + +/// Generate holiday map for Brazil. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 1)?, + "Confraternização Universal", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 21)?, + "Sexta-feira Santa; Tiradentes", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2000, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2000, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2000, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2001, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2001, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2001, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2001, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2002, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2002, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2002, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2002, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2003, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2003, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2003, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2004, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2004, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2004, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2005, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2005, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2005, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2005, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2006, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2006, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2006, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2007, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2007, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2007, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2007, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2008, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2008, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2008, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2008, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2009, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2009, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2009, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2009, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2010, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2010, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2010, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2011, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2011, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2011, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2012, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2012, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2012, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2012, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2013, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2013, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2013, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2013, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2014, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2014, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2014, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2015, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2015, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2015, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2015, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2016, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2016, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2016, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2016, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2017, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2017, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2017, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2017, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2018, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2018, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2018, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2018, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2019, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2019, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2019, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2020, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2020, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2020, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2020, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2021, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2021, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2021, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2021, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2022, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2022, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2022, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2022, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2023, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2023, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2023, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2024, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2024, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2024, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2024, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2025, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2025, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2025, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2026, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2026, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2026, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2026, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2027, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2027, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2027, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2027, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2028, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2028, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2028, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2028, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2029, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2029, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2029, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2029, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 1)?, + "Confraternização Universal", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Tiradentes"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2030, 9, 7)?, + "Independência do Brasil", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 12)?, + "Nossa Senhora Aparecida", + ), + (NaiveDate::from_ymd_res(2030, 11, 2)?, "Finados"), + ( + NaiveDate::from_ymd_res(2030, 11, 15)?, + "Proclamação da República", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Natal"), + ], + &mut map, + Country::BR, + "Brazil", + ); + + Ok(map) +} diff --git a/src/data/bw.rs b/src/data/bw.rs new file mode 100644 index 0000000..7358f8d --- /dev/null +++ b/src/data/bw.rs @@ -0,0 +1,1279 @@ +//! Botswana +use super::*; + +/// Generate holiday map for Botswana. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 2)?, + "New Year's Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "New Year's Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 22)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2000, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2000, 7, 17)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2000, 7, 18)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2000, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2000, 10, 1)?, + "Botswana Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 2)?, + "Botswana Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2001, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2001, 7, 1)?, + "Sir Seretse Khama Day", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 2)?, + "Sir Seretse Khama Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 7, 16)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2001, 7, 17)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2001, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2001, 10, 2)?, + "Botswana Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2002, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 3, 30)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2002, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2002, 7, 15)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2002, 7, 16)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2002, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2002, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2003, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 19)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2003, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2003, 7, 21)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2003, 7, 22)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2003, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2003, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2004, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2004, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2004, 7, 19)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2004, 7, 20)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2004, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2004, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 2)?, + "New Year's Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "New Year's Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 26)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2005, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2005, 7, 18)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2005, 7, 19)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2005, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2005, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 15)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2006, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2006, 7, 17)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2006, 7, 18)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2006, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 1)?, + "Botswana Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 2)?, + "Botswana Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2007, 7, 1)?, + "Sir Seretse Khama Day", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 2)?, + "Sir Seretse Khama Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 7, 16)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2007, 7, 17)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2007, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2007, 10, 2)?, + "Botswana Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2008, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Ascension Day; Labour Day", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2008, 7, 21)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2008, 7, 22)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2008, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2009, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 11)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2009, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2009, 7, 20)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2009, 7, 21)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2009, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2009, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2010, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2010, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2010, 7, 19)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2010, 7, 20)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2010, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2010, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 2)?, + "New Year's Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "New Year's Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2011, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2011, 7, 18)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2011, 7, 19)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2011, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2011, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 7)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2012, 7, 1)?, + "Sir Seretse Khama Day", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 2)?, + "Sir Seretse Khama Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 7, 16)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2012, 7, 17)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2012, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2012, 10, 2)?, + "Botswana Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2013, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 3, 30)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2013, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2013, 7, 15)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2013, 7, 16)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2013, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2013, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2014, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2014, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2014, 7, 21)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2014, 7, 22)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2014, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2014, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2015, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 4)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2015, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2015, 7, 20)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2015, 7, 21)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2015, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2015, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2016, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 26)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2016, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2016, 7, 18)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2016, 7, 19)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2016, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2017, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2017, 7, 17)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2017, 7, 18)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2017, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 1)?, + "Botswana Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 2)?, + "Botswana Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2018, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2018, 7, 1)?, + "Sir Seretse Khama Day", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 2)?, + "Sir Seretse Khama Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 7, 16)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2018, 7, 17)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2018, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2018, 10, 2)?, + "Botswana Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2019, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 20)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2019, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2019, 7, 15)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2019, 7, 16)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2019, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + (NaiveDate::from_ymd_res(2019, 7, 2)?, "Public Holiday"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 11)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2020, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2020, 7, 20)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2020, 7, 21)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2020, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + (NaiveDate::from_ymd_res(2020, 12, 28)?, "Boxing Day Holiday"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2021, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 3)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "Labour Day Holiday"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2021, 7, 19)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2021, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 2)?, + "New Year's Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "New Year's Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 16)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2022, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2022, 7, 18)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2022, 7, 19)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2022, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 8)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2023, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2023, 7, 17)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2023, 7, 18)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2023, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 1)?, + "Botswana Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 2)?, + "Botswana Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2024, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 3, 30)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2024, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2024, 7, 15)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2024, 7, 16)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2024, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2025, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2025, 7, 21)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2025, 7, 22)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2025, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2026, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 4)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2026, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2026, 7, 20)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2026, 7, 21)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2026, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + (NaiveDate::from_ymd_res(2026, 12, 28)?, "Boxing Day Holiday"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 27)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "Labour Day Holiday"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2027, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2027, 7, 19)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2027, 7, 20)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2027, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 2)?, + "New Year's Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "New Year's Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2028, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2028, 7, 17)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2028, 7, 18)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2028, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 1)?, + "Botswana Day Holiday", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 2)?, + "Botswana Day Holiday (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2029, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2029, 7, 1)?, + "Sir Seretse Khama Day", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 2)?, + "Sir Seretse Khama Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 7, 16)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2029, 7, 17)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2029, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 2)?, + "Botswana Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2030, 1, 2)?, + "New Year's Day Holiday", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 20)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Ascension Day"), + ( + NaiveDate::from_ymd_res(2030, 7, 1)?, + "Sir Seretse Khama Day", + ), + (NaiveDate::from_ymd_res(2030, 7, 15)?, "President's Day"), + ( + NaiveDate::from_ymd_res(2030, 7, 16)?, + "President's Day Holiday", + ), + (NaiveDate::from_ymd_res(2030, 9, 30)?, "Botswana Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 1)?, + "Botswana Day Holiday", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::BW, + "Botswana", + ); + + Ok(map) +} diff --git a/src/data/by.rs b/src/data/by.rs new file mode 100644 index 0000000..7b211a8 --- /dev/null +++ b/src/data/by.rs @@ -0,0 +1,1302 @@ +//! Belarus +use super::*; + +/// Generate holiday map for Belarus. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2000, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2000, 3, 8)?, "Дзень жанчын"), + ( + NaiveDate::from_ymd_res(2000, 5, 9)?, + "Дзень Перамогі; Радаўніца", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Свята працы"), + ( + NaiveDate::from_ymd_res(2000, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 8)?, + "Выходны (перанесены з 13.05.2000)", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 6)?, + "Выходны (перанесены з 11.11.2000)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2001, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2001, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2001, 4, 24)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2001, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2001, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 2)?, + "Выходны (перанесены з 20.01.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 9)?, + "Выходны (перанесены з 03.03.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 23)?, + "Выходны (перанесены з 21.04.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 30)?, + "Выходны (перанесены з 28.04.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 2)?, + "Выходны (перанесены з 07.07.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 24)?, + "Выходны (перанесены з 22.12.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 31)?, + "Выходны (перанесены з 29.12.2001)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2002, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2002, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2002, 5, 14)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2002, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2002, 1, 2)?, + "Выходны (перанесены з 05.01.2002)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 10)?, + "Выходны (перанесены з 18.05.2002)", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 8)?, + "Выходны (перанесены з 16.11.2002)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2003, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2003, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2003, 5, 6)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2003, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2003, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 6)?, + "Выходны (перанесены з 04.01.2003)", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 5)?, + "Выходны (перанесены з 03.05.2003)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2004, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2004, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2004, 4, 20)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2004, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2004, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 2)?, + "Выходны (перанесены з 10.01.2004)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 5)?, + "Выходны (перанесены з 17.01.2004)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 6)?, + "Выходны (перанесены з 31.01.2004)", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 19)?, + "Выходны (перанесены з 17.04.2004)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2005, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2005, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2005, 5, 10)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2005, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2005, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 7)?, + "Выходны (перанесены з 12.03.2005)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2006, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2006, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2006, 5, 2)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2006, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2006, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "Выходны (перанесены з 21.01.2006)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 8)?, + "Выходны (перанесены з 06.05.2006)", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 6)?, + "Выходны (перанесены з 04.11.2006)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2007, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2007, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2007, 4, 17)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2007, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2007, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "Выходны (перанесены з 30.12.2006)", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 9)?, + "Выходны (перанесены з 17.03.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 16)?, + "Выходны (перанесены з 14.04.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 30)?, + "Выходны (перанесены з 05.05.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 2)?, + "Выходны (перанесены з 07.07.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 24)?, + "Выходны (перанесены з 22.12.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 31)?, + "Выходны (перанесены з 29.12.2007)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2008, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2008, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2008, 5, 6)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2008, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2008, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 2)?, + "Выходны (перанесены з 12.01.2008)", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 5)?, + "Выходны (перанесены з 03.05.2008)", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 4)?, + "Выходны (перанесены з 28.06.2008)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Выходны (перанесены з 20.12.2008)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2009, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2009, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2009, 4, 28)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2009, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2009, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 2)?, + "Выходны (перанесены з 10.01.2009)", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 27)?, + "Выходны (перанесены з 25.04.2009)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2010, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2010, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2010, 4, 13)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2010, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2010, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 8)?, + "Выходны (перанесены з 23.01.2010)", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 12)?, + "Выходны (перанесены з 17.04.2010)", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 10)?, + "Выходны (перанесены з 15.05.2010)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2011, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2011, 5, 3)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2011, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2011, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 7)?, + "Выходны (перанесены з 12.03.2011)", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Выходны (перанесены з 14.05.2011)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2012, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2012, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2012, 4, 24)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2012, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2012, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 9)?, + "Выходны (перанесены з 11.03.2012)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 23)?, + "Выходны (перанесены з 28.04.2012)", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 2)?, + "Выходны (перанесены з 30.06.2012)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 24)?, + "Выходны (перанесены з 22.12.2012)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 31)?, + "Выходны (перанесены з 29.12.2012)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2013, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2013, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2013, 5, 14)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2013, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 2)?, + "Выходны (перанесены з 05.01.2013)", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 10)?, + "Выходны (перанесены з 18.05.2013)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2014, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2014, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2014, 4, 29)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2014, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2014, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 2)?, + "Выходны (перанесены з 04.01.2014)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "Выходны (перанесены з 11.01.2014)", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 30)?, + "Выходны (перанесены з 03.05.2014)", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 4)?, + "Выходны (перанесены з 12.07.2014)", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Выходны (перанесены з 20.12.2014)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2015, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2015, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2015, 4, 21)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2015, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2015, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 2)?, + "Выходны (перанесены з 10.01.2015)", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 20)?, + "Выходны (перанесены з 25.04.2015)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2016, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2016, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2016, 5, 10)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2016, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2016, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 8)?, + "Выходны (перанесены з 16.01.2016)", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 7)?, + "Выходны (перанесены з 05.03.2016)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2017, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2017, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2017, 4, 25)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2017, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2017, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "Выходны (перанесены з 21.01.2017)", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Выходны (перанесены з 29.04.2017)", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 8)?, + "Выходны (перанесены з 06.05.2017)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 6)?, + "Выходны (перанесены з 04.11.2017)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2018, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2018, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2018, 4, 17)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2018, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2018, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 2)?, + "Выходны (перанесены з 20.01.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 9)?, + "Выходны (перанесены з 03.03.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 16)?, + "Выходны (перанесены з 14.04.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "Выходны (перанесены з 28.04.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 2)?, + "Выходны (перанесены з 07.07.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 24)?, + "Выходны (перанесены з 22.12.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Выходны (перанесены з 29.12.2018)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2019, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2019, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2019, 5, 7)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2019, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2019, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 6)?, + "Выходны (перанесены з 04.05.2019)", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 8)?, + "Выходны (перанесены з 11.05.2019)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 8)?, + "Выходны (перанесены з 16.11.2019)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2020, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2020, 4, 28)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2020, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2020, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 6)?, + "Выходны (перанесены з 04.01.2020)", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 27)?, + "Выходны (перанесены з 04.04.2020)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2021, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2021, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2021, 5, 11)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2021, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2021, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 8)?, + "Выходны (перанесены з 16.01.2021)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 10)?, + "Выходны (перанесены з 15.05.2021)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2022, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2022, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2022, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2022, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 7)?, + "Выходны (перанесены з 12.03.2022)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Выходны (перанесены з 14.05.2022)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2023, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2023, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2023, 4, 25)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2023, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2023, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Выходны (перанесены з 29.04.2023)", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 8)?, + "Выходны (перанесены з 13.05.2023)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 6)?, + "Выходны (перанесены з 11.11.2023)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2024, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2024, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2024, 5, 14)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2024, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2025, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2025, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2025, 4, 29)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2025, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2025, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2026, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2026, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2026, 4, 21)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2026, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2026, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2027, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2027, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2027, 5, 11)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2027, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2027, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2028, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2028, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2028, 4, 25)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2028, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2028, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2029, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2029, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2029, 4, 17)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2029, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2029, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Новы год"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Новы год"), + ( + NaiveDate::from_ymd_res(2030, 1, 7)?, + "Нараджэнне Хрыстова (праваслаўнае Раство)", + ), + (NaiveDate::from_ymd_res(2030, 3, 8)?, "Дзень жанчын"), + (NaiveDate::from_ymd_res(2030, 5, 7)?, "Радаўніца"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Свята працы"), + (NaiveDate::from_ymd_res(2030, 5, 9)?, "Дзень Перамогі"), + ( + NaiveDate::from_ymd_res(2030, 7, 3)?, + "Дзень Незалежнасці Рэспублікі Беларусь (Дзень Рэспублікі)", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 7)?, + "Дзень Кастрычніцкай рэвалюцыі", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 25)?, + "Нараджэнне Хрыстова (каталіцкае Раство)", + ), + ], + &mut map, + Country::BY, + "Belarus", + ); + + Ok(map) +} diff --git a/src/data/ca.rs b/src/data/ca.rs new file mode 100644 index 0000000..fc429ab --- /dev/null +++ b/src/data/ca.rs @@ -0,0 +1,545 @@ +//! Canada +use super::*; + +/// Generate holiday map for Canada. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2000, 9, 4)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2001, 9, 3)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2002, 9, 2)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2003, 9, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2004, 9, 6)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2005, 9, 5)?, "Labour Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2006, 9, 4)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2007, 9, 3)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2008, 9, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2009, 9, 7)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2010, 9, 6)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2011, 9, 5)?, "Labour Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2012, 9, 3)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2013, 9, 2)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2014, 9, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2015, 9, 7)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2016, 9, 5)?, "Labour Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2017, 9, 4)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2018, 9, 3)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2019, 9, 2)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2020, 9, 7)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2021, 9, 6)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2022, 9, 5)?, "Labour Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2023, 9, 4)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2024, 9, 2)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2025, 9, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2026, 9, 7)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2027, 9, 6)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2028, 9, 4)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2029, 9, 3)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 7, 1)?, "Canada Day"), + (NaiveDate::from_ymd_res(2030, 9, 2)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::CA, + "Canada", + ); + + Ok(map) +} diff --git a/src/data/ch.rs b/src/data/ch.rs new file mode 100644 index 0000000..eea9fb0 --- /dev/null +++ b/src/data/ch.rs @@ -0,0 +1,446 @@ +//! Switzerland +use super::*; + +/// Generate holiday map for Switzerland. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2000, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2001, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2002, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2003, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2004, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2005, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2006, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2007, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2008, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2009, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2010, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2011, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2012, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2013, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2014, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2015, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2016, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2017, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2018, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2019, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2020, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2021, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2022, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2023, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2024, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2025, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2026, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2027, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2028, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2029, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Neujahrestag"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2030, 8, 1)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Weihnachten"), + ], + &mut map, + Country::CH, + "Switzerland", + ); + + Ok(map) +} diff --git a/src/data/cl.rs b/src/data/cl.rs new file mode 100644 index 0000000..4ea7b0b --- /dev/null +++ b/src/data/cl.rs @@ -0,0 +1,1746 @@ +//! Chile +use super::*; + +/// Generate holiday map for Chile. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2000, 4, 22)?, "Sábado Santo"), + (NaiveDate::from_ymd_res(2000, 6, 19)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 26)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 4)?, + "Día de la Unidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 9)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "Sábado Santo"), + (NaiveDate::from_ymd_res(2001, 6, 11)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 2)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 3)?, + "Día de la Unidad Nacional", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 15)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2002, 3, 30)?, "Sábado Santo"), + (NaiveDate::from_ymd_res(2002, 5, 27)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2003, 4, 19)?, "Sábado Santo"), + (NaiveDate::from_ymd_res(2003, 6, 16)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "Sábado Santo"), + (NaiveDate::from_ymd_res(2004, 6, 7)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 28)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 11)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2005, 3, 26)?, "Sábado Santo"), + (NaiveDate::from_ymd_res(2005, 5, 23)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 27)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 10)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2006, 4, 15)?, "Sábado Santo"), + (NaiveDate::from_ymd_res(2006, 6, 12)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 26)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 9)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 2)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2007, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Asunción de la Virgen", + ), + (NaiveDate::from_ymd_res(2007, 9, 17)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2007, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2008, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2009, 4, 11)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2009, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 28)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2010, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 11)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 27)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2011, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 10)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2012, 4, 7)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 2)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2012, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Asunción de la Virgen", + ), + (NaiveDate::from_ymd_res(2012, 9, 17)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2012, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 15)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 2)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2013, 3, 30)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2013, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 19)?, + "Día de las Glorias del Ejército", + ), + (NaiveDate::from_ymd_res(2013, 9, 20)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2013, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2014, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2015, 4, 4)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2015, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2016, 3, 26)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 27)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2016, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Feriado nacional"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2017, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 9)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 27)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 2)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2018, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Asunción de la Virgen", + ), + (NaiveDate::from_ymd_res(2018, 9, 17)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2018, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 15)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 2)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2019, 4, 20)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2019, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 19)?, + "Día de las Glorias del Ejército", + ), + (NaiveDate::from_ymd_res(2019, 9, 20)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2019, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2020, 4, 11)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2020, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2021, 4, 3)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 21)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 28)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2021, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Asunción de la Virgen", + ), + (NaiveDate::from_ymd_res(2021, 9, 17)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2021, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2022, 4, 16)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 21)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 27)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2022, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2022, 9, 16)?, "Feriado nacional"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Feriado nacional"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2023, 4, 8)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 21)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 26)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2023, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 27)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2024, 3, 30)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 20)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2024, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 19)?, + "Día de las Glorias del Ejército", + ), + (NaiveDate::from_ymd_res(2024, 9, 20)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2024, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 20)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2025, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2026, 4, 4)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 21)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2026, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2027, 3, 27)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 21)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 28)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2027, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Asunción de la Virgen", + ), + (NaiveDate::from_ymd_res(2027, 9, 17)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2027, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 20)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 26)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2028, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 27)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 20)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 2)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2029, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Asunción de la Virgen", + ), + (NaiveDate::from_ymd_res(2029, 9, 17)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2029, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 19)?, + "Día de las Glorias del Ejército", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 15)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 2)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2030, 4, 20)?, "Sábado Santo"), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Día Nacional del Trabajo", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 21)?, + "Día de las Glorias Navales", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 21)?, + "Día Nacional de los Pueblos Indígenas", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 29)?, + "San Pedro y San Pablo", + ), + (NaiveDate::from_ymd_res(2030, 7, 16)?, "Virgen del Carmen"), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 18)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 19)?, + "Día de las Glorias del Ejército", + ), + (NaiveDate::from_ymd_res(2030, 9, 20)?, "Fiestas Patrias"), + ( + NaiveDate::from_ymd_res(2030, 10, 12)?, + "Día del Encuentro de dos Mundos", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 31)?, + "Día Nacional de las Iglesias Evangélicas y Protestantes", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CL, + "Chile", + ); + + Ok(map) +} diff --git a/src/data/cn.rs b/src/data/cn.rs new file mode 100644 index 0000000..c155583 --- /dev/null +++ b/src/data/cn.rs @@ -0,0 +1,1385 @@ +//! China +use super::*; + +/// Generate holiday map for China. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2000, 2, 5)?, "春节"), + (NaiveDate::from_ymd_res(2000, 2, 6)?, "春节"), + (NaiveDate::from_ymd_res(2000, 2, 7)?, "春节"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2000, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2000, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2000, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2000, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2000, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2000, 1, 3)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2000, 2, 8)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2000, 2, 9)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2000, 10, 4)?, "国庆节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2001, 1, 24)?, "春节"), + (NaiveDate::from_ymd_res(2001, 1, 25)?, "春节"), + (NaiveDate::from_ymd_res(2001, 1, 26)?, "春节"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2001, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2001, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2001, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2001, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2001, 10, 3)?, "国庆节"), + ( + NaiveDate::from_ymd_res(2001, 1, 29)?, + "休息日(2001-01-20日起取代)", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 30)?, + "休息日(2001-01-21日起取代)", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 4)?, + "休息日(2001-04-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 7)?, + "休息日(2001-04-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 4)?, + "休息日(2001-09-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 5)?, + "休息日(2001-09-30日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "春节"), + (NaiveDate::from_ymd_res(2002, 2, 13)?, "春节"), + (NaiveDate::from_ymd_res(2002, 2, 14)?, "春节"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2002, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2002, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2002, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2002, 10, 3)?, "国庆节"), + ( + NaiveDate::from_ymd_res(2002, 1, 2)?, + "休息日(2001-12-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2002, 1, 3)?, + "休息日(2001-12-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 15)?, + "休息日(2002-02-09日起取代)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 18)?, + "休息日(2002-02-10日起取代)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 6)?, + "休息日(2002-04-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 7)?, + "休息日(2002-04-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 4)?, + "休息日(2002-09-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 7)?, + "休息日(2002-09-29日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2003, 2, 1)?, "春节"), + (NaiveDate::from_ymd_res(2003, 2, 2)?, "春节"), + (NaiveDate::from_ymd_res(2003, 2, 3)?, "春节"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2003, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2003, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2003, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2003, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2003, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2003, 2, 4)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2003, 2, 5)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "劳动节(观察日)"), + ( + NaiveDate::from_ymd_res(2003, 2, 6)?, + "休息日(2003-02-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 7)?, + "休息日(2003-02-09日起取代)", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 6)?, + "休息日(2003-04-26日起取代)", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 7)?, + "休息日(2003-04-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 6)?, + "休息日(2003-09-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 7)?, + "休息日(2003-09-28日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2004, 1, 22)?, "春节"), + (NaiveDate::from_ymd_res(2004, 1, 23)?, "春节"), + (NaiveDate::from_ymd_res(2004, 1, 24)?, "春节"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2004, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2004, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2004, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2004, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2004, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2004, 1, 26)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2004, 5, 4)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2004, 5, 5)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2004, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2004, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2004, 1, 27)?, + "休息日(2004-01-17日起取代)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 28)?, + "休息日(2004-01-18日起取代)", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 6)?, + "休息日(2004-05-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 7)?, + "休息日(2004-05-09日起取代)", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 6)?, + "休息日(2004-10-09日起取代)", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 7)?, + "休息日(2004-10-10日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "春节"), + (NaiveDate::from_ymd_res(2005, 2, 10)?, "春节"), + (NaiveDate::from_ymd_res(2005, 2, 11)?, "春节"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2005, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2005, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2005, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2005, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2005, 1, 3)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2005, 5, 4)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2005, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2005, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2005, 2, 14)?, + "休息日(2005-02-05日起取代)", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 15)?, + "休息日(2005-02-06日起取代)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 5)?, + "休息日(2005-04-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 6)?, + "休息日(2005-05-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 6)?, + "休息日(2005-10-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 7)?, + "休息日(2005-10-09日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2006, 1, 29)?, "春节"), + (NaiveDate::from_ymd_res(2006, 1, 30)?, "春节"), + (NaiveDate::from_ymd_res(2006, 1, 31)?, "春节"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2006, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2006, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2006, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2006, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2006, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2006, 2, 1)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2006, 10, 4)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2006, 1, 3)?, + "休息日(2005-12-31日起取代)", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 2)?, + "休息日(2006-01-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 3)?, + "休息日(2006-02-05日起取代)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 4)?, + "休息日(2006-04-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 5)?, + "休息日(2006-04-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 5)?, + "休息日(2006-09-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 6)?, + "休息日(2006-10-08日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2007, 2, 18)?, "春节"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "春节"), + (NaiveDate::from_ymd_res(2007, 2, 20)?, "春节"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2007, 5, 2)?, "劳动节"), + (NaiveDate::from_ymd_res(2007, 5, 3)?, "劳动节"), + (NaiveDate::from_ymd_res(2007, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2007, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2007, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2007, 2, 21)?, "春节(观察日)"), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "休息日(2006-12-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 3)?, + "休息日(2006-12-31日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 22)?, + "休息日(2007-02-17日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 23)?, + "休息日(2007-02-25日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 4)?, + "休息日(2007-04-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 7)?, + "休息日(2007-04-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 4)?, + "休息日(2007-09-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 5)?, + "休息日(2007-09-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 31)?, + "休息日(2007-12-29日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2008, 2, 7)?, "春节"), + (NaiveDate::from_ymd_res(2008, 2, 8)?, "春节"), + (NaiveDate::from_ymd_res(2008, 2, 6)?, "农历除夕"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2008, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2008, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2008, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2008, 6, 8)?, "端午节"), + (NaiveDate::from_ymd_res(2008, 9, 14)?, "中秋节"), + (NaiveDate::from_ymd_res(2008, 6, 9)?, "端午节(观察日)"), + (NaiveDate::from_ymd_res(2008, 9, 15)?, "中秋节(观察日)"), + ( + NaiveDate::from_ymd_res(2008, 2, 11)?, + "休息日(2008-02-02日起取代)", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 12)?, + "休息日(2008-02-03日起取代)", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 2)?, + "休息日(2008-05-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 29)?, + "休息日(2008-09-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 30)?, + "休息日(2008-09-28日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "春节"), + (NaiveDate::from_ymd_res(2009, 1, 27)?, "春节"), + (NaiveDate::from_ymd_res(2009, 1, 25)?, "农历除夕"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2009, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2009, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2009, 10, 3)?, "中秋节; 国庆节"), + (NaiveDate::from_ymd_res(2009, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2009, 5, 28)?, "端午节"), + (NaiveDate::from_ymd_res(2009, 1, 28)?, "农历除夕(观察日)"), + (NaiveDate::from_ymd_res(2009, 4, 6)?, "清明节(观察日)"), + (NaiveDate::from_ymd_res(2009, 10, 5)?, "中秋节(观察日)"), + (NaiveDate::from_ymd_res(2009, 10, 6)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2009, 1, 2)?, + "休息日(2009-01-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 29)?, + "休息日(2009-01-24日起取代)", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 30)?, + "休息日(2009-02-01日起取代)", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 29)?, + "休息日(2009-05-31日起取代)", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 7)?, + "休息日(2009-09-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 8)?, + "休息日(2009-10-10日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2010, 2, 14)?, "春节"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "春节"), + (NaiveDate::from_ymd_res(2010, 2, 13)?, "农历除夕"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2010, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2010, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2010, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2010, 6, 16)?, "端午节"), + (NaiveDate::from_ymd_res(2010, 9, 22)?, "中秋节"), + (NaiveDate::from_ymd_res(2010, 2, 16)?, "农历除夕(观察日)"), + (NaiveDate::from_ymd_res(2010, 2, 17)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2010, 5, 3)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2010, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2010, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2010, 2, 18)?, + "休息日(2010-02-20日起取代)", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 19)?, + "休息日(2010-02-21日起取代)", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 14)?, + "休息日(2010-06-12日起取代)", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 15)?, + "休息日(2010-06-13日起取代)", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 23)?, + "休息日(2010-09-19日起取代)", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 24)?, + "休息日(2010-09-25日起取代)", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 6)?, + "休息日(2010-09-26日起取代)", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 7)?, + "休息日(2010-10-09日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2011, 2, 3)?, "春节"), + (NaiveDate::from_ymd_res(2011, 2, 4)?, "春节"), + (NaiveDate::from_ymd_res(2011, 2, 2)?, "农历除夕"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2011, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2011, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2011, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2011, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2011, 6, 6)?, "端午节"), + (NaiveDate::from_ymd_res(2011, 9, 12)?, "中秋节"), + (NaiveDate::from_ymd_res(2011, 1, 3)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2011, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2011, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2011, 2, 7)?, + "休息日(2011-01-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 8)?, + "休息日(2011-02-12日起取代)", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 4)?, + "休息日(2011-04-02日起取代)", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 6)?, + "休息日(2011-10-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 7)?, + "休息日(2011-10-09日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2012, 1, 23)?, "春节"), + (NaiveDate::from_ymd_res(2012, 1, 24)?, "春节"), + (NaiveDate::from_ymd_res(2012, 1, 22)?, "农历除夕"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2012, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2012, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2012, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2012, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "端午节"), + (NaiveDate::from_ymd_res(2012, 9, 30)?, "中秋节"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2012, 1, 25)?, "农历除夕(观察日)"), + (NaiveDate::from_ymd_res(2012, 10, 4)?, "中秋节(观察日)"), + ( + NaiveDate::from_ymd_res(2012, 1, 3)?, + "休息日(2011-12-31日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 26)?, + "休息日(2012-01-21日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 27)?, + "休息日(2012-01-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 2)?, + "休息日(2012-03-31日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 3)?, + "休息日(2012-04-01日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 30)?, + "休息日(2012-04-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 5)?, + "休息日(2012-09-29日起取代)", + ), + (NaiveDate::from_ymd_res(2012, 6, 22)?, "端午节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2013, 2, 10)?, "春节"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "春节"), + (NaiveDate::from_ymd_res(2013, 2, 9)?, "农历除夕"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2013, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2013, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2013, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2013, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2013, 6, 12)?, "端午节"), + (NaiveDate::from_ymd_res(2013, 9, 19)?, "中秋节"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "农历除夕(观察日)"), + (NaiveDate::from_ymd_res(2013, 2, 13)?, "春节(观察日)"), + ( + NaiveDate::from_ymd_res(2013, 1, 2)?, + "休息日(2013-01-05日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 3)?, + "休息日(2013-01-06日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 14)?, + "休息日(2013-02-16日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 15)?, + "休息日(2013-02-17日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 5)?, + "休息日(2013-04-07日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 29)?, + "休息日(2013-04-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 30)?, + "休息日(2013-04-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 10)?, + "休息日(2013-06-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 11)?, + "休息日(2013-06-09日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 20)?, + "休息日(2013-09-22日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 4)?, + "休息日(2013-09-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 7)?, + "休息日(2013-10-12日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2014, 1, 31)?, "春节"), + (NaiveDate::from_ymd_res(2014, 2, 1)?, "春节"), + (NaiveDate::from_ymd_res(2014, 2, 2)?, "春节"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2014, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2014, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2014, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2014, 6, 2)?, "端午节"), + (NaiveDate::from_ymd_res(2014, 9, 8)?, "中秋节"), + (NaiveDate::from_ymd_res(2014, 2, 3)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2014, 2, 4)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2014, 4, 7)?, "清明节(观察日)"), + ( + NaiveDate::from_ymd_res(2014, 2, 5)?, + "休息日(2014-01-26日起取代)", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 6)?, + "休息日(2014-02-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 2)?, + "休息日(2014-05-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "休息日(2014-09-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 7)?, + "休息日(2014-10-11日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2015, 2, 19)?, "春节"), + (NaiveDate::from_ymd_res(2015, 2, 20)?, "春节"), + (NaiveDate::from_ymd_res(2015, 2, 21)?, "春节"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2015, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2015, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2015, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2015, 6, 20)?, "端午节"), + (NaiveDate::from_ymd_res(2015, 9, 27)?, "中秋节"), + (NaiveDate::from_ymd_res(2015, 2, 23)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "清明节(观察日)"), + (NaiveDate::from_ymd_res(2015, 6, 22)?, "端午节(观察日)"), + (NaiveDate::from_ymd_res(2015, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2015, 1, 2)?, + "休息日(2015-01-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 18)?, + "休息日(2015-02-15日起取代)", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 24)?, + "休息日(2015-02-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 3)?, + "中国人民抗日战争暨世界反法西斯战争胜利70周年纪念日", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 4)?, + "休息日(2015-09-06日起取代)", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 7)?, + "休息日(2015-10-10日起取代)", + ), + (NaiveDate::from_ymd_res(2015, 10, 6)?, "中秋节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "春节"), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "春节"), + (NaiveDate::from_ymd_res(2016, 2, 10)?, "春节"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2016, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2016, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2016, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2016, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2016, 6, 9)?, "端午节"), + (NaiveDate::from_ymd_res(2016, 9, 15)?, "中秋节"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2016, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2016, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2016, 2, 11)?, + "休息日(2016-02-06日起取代)", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 12)?, + "休息日(2016-02-14日起取代)", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 10)?, + "休息日(2016-06-12日起取代)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 16)?, + "休息日(2016-09-18日起取代)", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 6)?, + "休息日(2016-10-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 7)?, + "休息日(2016-10-09日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2017, 1, 28)?, "春节"), + (NaiveDate::from_ymd_res(2017, 1, 29)?, "春节"), + (NaiveDate::from_ymd_res(2017, 1, 30)?, "春节"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2017, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2017, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2017, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2017, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2017, 5, 30)?, "端午节"), + (NaiveDate::from_ymd_res(2017, 10, 4)?, "中秋节"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2017, 1, 31)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2017, 2, 1)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2017, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2017, 1, 27)?, + "休息日(2017-01-22日起取代)", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 2)?, + "休息日(2017-02-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 3)?, + "休息日(2017-04-01日起取代)", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 29)?, + "休息日(2017-05-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 6)?, + "休息日(2017-09-30日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2018, 2, 16)?, "春节"), + (NaiveDate::from_ymd_res(2018, 2, 17)?, "春节"), + (NaiveDate::from_ymd_res(2018, 2, 18)?, "春节"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2018, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2018, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2018, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2018, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2018, 6, 18)?, "端午节"), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "中秋节"), + (NaiveDate::from_ymd_res(2018, 2, 19)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2018, 2, 20)?, "春节(观察日)"), + ( + NaiveDate::from_ymd_res(2018, 2, 15)?, + "休息日(2018-02-11日起取代)", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 21)?, + "休息日(2018-02-24日起取代)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 6)?, + "休息日(2018-04-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "休息日(2018-04-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 4)?, + "休息日(2018-09-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 5)?, + "休息日(2018-09-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "休息日(2018-12-29日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "春节"), + (NaiveDate::from_ymd_res(2019, 2, 6)?, "春节"), + (NaiveDate::from_ymd_res(2019, 2, 7)?, "春节"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2019, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2019, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2019, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2019, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2019, 6, 7)?, "端午节"), + (NaiveDate::from_ymd_res(2019, 9, 13)?, "中秋节"), + ( + NaiveDate::from_ymd_res(2019, 2, 4)?, + "休息日(2019-02-02日起取代)", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 8)?, + "休息日(2019-02-03日起取代)", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 4)?, + "休息日(2019-09-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 7)?, + "休息日(2019-10-12日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "春节"), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "春节"), + (NaiveDate::from_ymd_res(2020, 1, 27)?, "春节"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2020, 10, 1)?, "中秋节; 国庆节"), + (NaiveDate::from_ymd_res(2020, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2020, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2020, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2020, 6, 25)?, "端午节"), + (NaiveDate::from_ymd_res(2020, 1, 28)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2020, 1, 29)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2020, 4, 6)?, "清明节(观察日)"), + (NaiveDate::from_ymd_res(2020, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2020, 1, 24)?, + "休息日(2020-01-19日起取代)", + ), + (NaiveDate::from_ymd_res(2020, 1, 31)?, "春节延长假期"), + (NaiveDate::from_ymd_res(2020, 2, 1)?, "春节延长假期"), + (NaiveDate::from_ymd_res(2020, 2, 2)?, "春节延长假期"), + ( + NaiveDate::from_ymd_res(2020, 5, 4)?, + "休息日(2020-04-26日起取代)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 5)?, + "休息日(2020-05-09日起取代)", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 26)?, + "休息日(2020-06-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 7)?, + "休息日(2020-09-27日起取代)", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 8)?, + "休息日(2020-10-10日起取代)", + ), + (NaiveDate::from_ymd_res(2020, 1, 30)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2020, 10, 6)?, "中秋节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "春节"), + (NaiveDate::from_ymd_res(2021, 2, 13)?, "春节"), + (NaiveDate::from_ymd_res(2021, 2, 14)?, "春节"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2021, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2021, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2021, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2021, 6, 14)?, "端午节"), + (NaiveDate::from_ymd_res(2021, 9, 21)?, "中秋节"), + (NaiveDate::from_ymd_res(2021, 2, 15)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2021, 2, 16)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "清明节(观察日)"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2021, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2021, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2021, 2, 11)?, + "休息日(2021-02-07日起取代)", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 17)?, + "休息日(2021-02-20日起取代)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 4)?, + "休息日(2021-04-25日起取代)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 5)?, + "休息日(2021-05-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 20)?, + "休息日(2021-09-18日起取代)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 6)?, + "休息日(2021-09-26日起取代)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 7)?, + "休息日(2021-10-09日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2022, 2, 1)?, "春节"), + (NaiveDate::from_ymd_res(2022, 2, 2)?, "春节"), + (NaiveDate::from_ymd_res(2022, 2, 3)?, "春节"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2022, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2022, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2022, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2022, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2022, 6, 3)?, "端午节"), + (NaiveDate::from_ymd_res(2022, 9, 10)?, "中秋节"), + (NaiveDate::from_ymd_res(2022, 1, 3)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2022, 9, 12)?, "中秋节(观察日)"), + (NaiveDate::from_ymd_res(2022, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2022, 10, 5)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2022, 1, 31)?, + "休息日(2022-01-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 4)?, + "休息日(2022-01-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 4)?, + "休息日(2022-04-02日起取代)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "休息日(2022-04-24日起取代)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 4)?, + "休息日(2022-05-07日起取代)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 6)?, + "休息日(2022-10-08日起取代)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 7)?, + "休息日(2022-10-09日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2023, 1, 22)?, "春节"), + (NaiveDate::from_ymd_res(2023, 1, 23)?, "春节"), + (NaiveDate::from_ymd_res(2023, 1, 24)?, "春节"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2023, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2023, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2023, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2023, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2023, 6, 22)?, "端午节"), + (NaiveDate::from_ymd_res(2023, 9, 29)?, "中秋节"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2023, 1, 25)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2023, 10, 4)?, "国庆节(观察日)"), + ( + NaiveDate::from_ymd_res(2023, 1, 26)?, + "休息日(2023-01-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 27)?, + "休息日(2023-01-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 2)?, + "休息日(2023-04-23日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 3)?, + "休息日(2023-05-06日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 23)?, + "休息日(2023-06-25日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 5)?, + "休息日(2023-10-07日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 6)?, + "休息日(2023-10-08日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2024, 2, 10)?, "春节"), + (NaiveDate::from_ymd_res(2024, 2, 11)?, "春节"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "春节"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2024, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2024, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2024, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2024, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2024, 6, 10)?, "端午节"), + (NaiveDate::from_ymd_res(2024, 9, 17)?, "中秋节"), + (NaiveDate::from_ymd_res(2024, 2, 13)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2024, 2, 14)?, "春节(观察日)"), + ( + NaiveDate::from_ymd_res(2024, 2, 15)?, + "休息日(2024-02-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 16)?, + "休息日(2024-02-18日起取代)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 5)?, + "休息日(2024-04-07日起取代)", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 2)?, + "休息日(2024-04-28日起取代)", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 3)?, + "休息日(2024-05-11日起取代)", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 16)?, + "休息日(2024-09-14日起取代)", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 4)?, + "休息日(2024-09-29日起取代)", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 7)?, + "休息日(2024-10-12日起取代)", + ), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2025, 1, 29)?, "春节"), + (NaiveDate::from_ymd_res(2025, 1, 30)?, "春节"), + (NaiveDate::from_ymd_res(2025, 1, 31)?, "春节"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2025, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2025, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2025, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2025, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2025, 5, 31)?, "端午节"), + (NaiveDate::from_ymd_res(2025, 10, 6)?, "中秋节"), + (NaiveDate::from_ymd_res(2025, 6, 2)?, "端午节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "春节"), + (NaiveDate::from_ymd_res(2026, 2, 18)?, "春节"), + (NaiveDate::from_ymd_res(2026, 2, 19)?, "春节"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2026, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2026, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2026, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2026, 6, 19)?, "端午节"), + (NaiveDate::from_ymd_res(2026, 9, 25)?, "中秋节"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "清明节(观察日)"), + (NaiveDate::from_ymd_res(2026, 10, 5)?, "国庆节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2027, 2, 6)?, "春节"), + (NaiveDate::from_ymd_res(2027, 2, 7)?, "春节"), + (NaiveDate::from_ymd_res(2027, 2, 8)?, "春节"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2027, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2027, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2027, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2027, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2027, 6, 9)?, "端午节"), + (NaiveDate::from_ymd_res(2027, 9, 15)?, "中秋节"), + (NaiveDate::from_ymd_res(2027, 2, 9)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2027, 2, 10)?, "春节(观察日)"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "劳动节(观察日)"), + (NaiveDate::from_ymd_res(2027, 10, 4)?, "国庆节(观察日)"), + (NaiveDate::from_ymd_res(2027, 10, 5)?, "国庆节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2028, 1, 26)?, "春节"), + (NaiveDate::from_ymd_res(2028, 1, 27)?, "春节"), + (NaiveDate::from_ymd_res(2028, 1, 28)?, "春节"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2028, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2028, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2028, 10, 3)?, "中秋节; 国庆节"), + (NaiveDate::from_ymd_res(2028, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "端午节"), + (NaiveDate::from_ymd_res(2028, 1, 3)?, "元旦(观察日)"), + (NaiveDate::from_ymd_res(2028, 5, 29)?, "端午节(观察日)"), + (NaiveDate::from_ymd_res(2028, 10, 4)?, "国庆节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "春节"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "春节"), + (NaiveDate::from_ymd_res(2029, 2, 15)?, "春节"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2029, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2029, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2029, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2029, 4, 4)?, "清明节"), + (NaiveDate::from_ymd_res(2029, 6, 16)?, "端午节"), + (NaiveDate::from_ymd_res(2029, 9, 22)?, "中秋节"), + (NaiveDate::from_ymd_res(2029, 6, 18)?, "端午节(观察日)"), + (NaiveDate::from_ymd_res(2029, 9, 24)?, "中秋节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "元旦"), + (NaiveDate::from_ymd_res(2030, 2, 3)?, "春节"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "春节"), + (NaiveDate::from_ymd_res(2030, 2, 5)?, "春节"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "劳动节"), + (NaiveDate::from_ymd_res(2030, 10, 1)?, "国庆节"), + (NaiveDate::from_ymd_res(2030, 10, 2)?, "国庆节"), + (NaiveDate::from_ymd_res(2030, 10, 3)?, "国庆节"), + (NaiveDate::from_ymd_res(2030, 4, 5)?, "清明节"), + (NaiveDate::from_ymd_res(2030, 6, 5)?, "端午节"), + (NaiveDate::from_ymd_res(2030, 9, 12)?, "中秋节"), + (NaiveDate::from_ymd_res(2030, 2, 6)?, "春节(观察日)"), + ], + &mut map, + Country::CN, + "China", + ); + + Ok(map) +} diff --git a/src/data/co.rs b/src/data/co.rs new file mode 100644 index 0000000..e5416cd --- /dev/null +++ b/src/data/co.rs @@ -0,0 +1,1929 @@ +//! Colombia +use super::*; + +/// Generate holiday map for Colombia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 20)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2000, 6, 5)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 26)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2000, 7, 3)?, + "Sagrado Corazón (observado); San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2000, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2000, 8, 21)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 16)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 6)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 13)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2001, 1, 8)?, + "Día de los Reyes Magos (observado)", + ), + (NaiveDate::from_ymd_res(2001, 3, 19)?, "Día de San José"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2001, 5, 28)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 18)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2001, 6, 25)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 2)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2001, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2001, 8, 20)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 15)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 5)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 12)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2002, 1, 7)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 25)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2002, 5, 13)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 3)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2002, 6, 10)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 1)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2002, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2002, 8, 19)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 14)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 4)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 11)?, + "Independencia de Cartagena", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2003, 1, 6)?, + "Día de los Reyes Magos", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 24)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2003, 6, 2)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 23)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2003, 6, 30)?, + "Sagrado Corazón (observado); San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2003, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2003, 8, 18)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 13)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 3)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 17)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2004, 1, 12)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 22)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2004, 5, 24)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 14)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2004, 6, 21)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 5)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2004, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2004, 8, 16)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 18)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2005, 1, 10)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 21)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2005, 5, 9)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 30)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 6, 6)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 4)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2005, 8, 7)?, "Batalla de Boyacá"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "La Asunción"), + ( + NaiveDate::from_ymd_res(2005, 10, 17)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 7)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 14)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2006, 1, 9)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 20)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2006, 5, 29)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 19)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2006, 6, 26)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 3)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2006, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2006, 8, 21)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 16)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 6)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 13)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2007, 1, 8)?, + "Día de los Reyes Magos (observado)", + ), + (NaiveDate::from_ymd_res(2007, 3, 19)?, "Día de San José"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2007, 5, 21)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 11)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2007, 6, 18)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 2)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2007, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2007, 8, 20)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 5)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 12)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2008, 1, 7)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2008, 5, 5)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 26)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2008, 6, 2)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 30)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2008, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2008, 8, 18)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 13)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 3)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 17)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2009, 1, 12)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 23)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2009, 5, 25)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 15)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2009, 6, 22)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2009, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2009, 8, 17)?, + "La Asunción (observado)", + ), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2009, 11, 2)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 16)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2010, 1, 11)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 22)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2010, 5, 17)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 7)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2010, 6, 14)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 5)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2010, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2010, 8, 16)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 18)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 15)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2011, 1, 10)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 21)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2011, 6, 6)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 27)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2011, 7, 4)?, + "Sagrado Corazón (observado); San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2011, 8, 7)?, "Batalla de Boyacá"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "La Asunción"), + ( + NaiveDate::from_ymd_res(2011, 10, 17)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 14)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2012, 1, 9)?, + "Día de los Reyes Magos (observado)", + ), + (NaiveDate::from_ymd_res(2012, 3, 19)?, "Día de San José"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2012, 5, 21)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 11)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 6, 18)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 2)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2012, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 15)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 5)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 12)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2013, 1, 7)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 25)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2013, 5, 13)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 3)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2013, 6, 10)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 1)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2013, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2013, 8, 19)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 14)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 11)?, + "Independencia de Cartagena", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "Día de los Reyes Magos", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 24)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2014, 6, 2)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 23)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 6, 30)?, + "Sagrado Corazón (observado); San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2014, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2014, 8, 18)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 13)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 3)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 17)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2015, 1, 12)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 23)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2015, 5, 18)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 8)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2015, 6, 15)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2015, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2015, 8, 17)?, + "La Asunción (observado)", + ), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2015, 11, 2)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 16)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2016, 1, 11)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 21)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2016, 5, 9)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 30)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2016, 6, 6)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 4)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2016, 8, 7)?, "Batalla de Boyacá"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "La Asunción"), + ( + NaiveDate::from_ymd_res(2016, 10, 17)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 7)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 14)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2017, 1, 9)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 20)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2017, 5, 29)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 19)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 3)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2017, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2017, 8, 21)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 16)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 6)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 13)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2018, 1, 8)?, + "Día de los Reyes Magos (observado)", + ), + (NaiveDate::from_ymd_res(2018, 3, 19)?, "Día de San José"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2018, 5, 14)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 4)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2018, 6, 11)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 2)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2018, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2018, 8, 20)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 15)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 5)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 12)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2019, 1, 7)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 25)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2019, 6, 3)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 24)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2019, 7, 1)?, + "Sagrado Corazón (observado); San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2019, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2019, 8, 19)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 4)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 11)?, + "Independencia de Cartagena", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2020, 1, 6)?, + "Día de los Reyes Magos", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 23)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 15)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2020, 6, 22)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2020, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2020, 8, 17)?, + "La Asunción (observado)", + ), + (NaiveDate::from_ymd_res(2020, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2020, 11, 2)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 16)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2021, 1, 11)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 22)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2021, 5, 17)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 7)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2021, 6, 14)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 5)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2021, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2021, 8, 16)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 15)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2022, 1, 10)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 21)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2022, 5, 30)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 20)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2022, 6, 27)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 4)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2022, 8, 7)?, "Batalla de Boyacá"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "La Asunción"), + ( + NaiveDate::from_ymd_res(2022, 10, 17)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 7)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 14)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2023, 1, 9)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 20)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2023, 5, 22)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 12)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2023, 6, 19)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 3)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2023, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2023, 8, 21)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 16)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 6)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 13)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2024, 1, 8)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 25)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2024, 5, 13)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 3)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2024, 6, 10)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 1)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2024, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2024, 8, 19)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 4)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 11)?, + "Independencia de Cartagena", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2025, 1, 6)?, + "Día de los Reyes Magos", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 24)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2025, 6, 2)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 23)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2025, 6, 30)?, + "Sagrado Corazón (observado); San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2025, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2025, 8, 18)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 3)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 17)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2026, 1, 12)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 23)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2026, 5, 18)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 8)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2026, 6, 15)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2026, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2026, 8, 17)?, + "La Asunción (observado)", + ), + (NaiveDate::from_ymd_res(2026, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2026, 11, 2)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 16)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2027, 1, 11)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 22)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2027, 5, 10)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 31)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2027, 6, 7)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 5)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2027, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2027, 8, 16)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 18)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 1)?, + "Día de Todos los Santos", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 15)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2028, 1, 10)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 20)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2028, 5, 29)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 19)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2028, 6, 26)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 3)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2028, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2028, 8, 21)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 16)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 6)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 13)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2029, 1, 8)?, + "Día de los Reyes Magos (observado)", + ), + (NaiveDate::from_ymd_res(2029, 3, 19)?, "Día de San José"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 4)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2029, 6, 11)?, + "Sagrado Corazón (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 2)?, + "San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2029, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2029, 8, 20)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 15)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 5)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 12)?, + "Independencia de Cartagena (observado)", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2030, 1, 7)?, + "Día de los Reyes Magos (observado)", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 25)?, + "Día de San José (observado)", + ), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2030, 6, 3)?, + "Ascensión del señor (observado)", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 24)?, + "Corpus Christi (observado)", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2030, 7, 1)?, + "Sagrado Corazón (observado); San Pedro y San Pablo (observado)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 20)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2030, 8, 7)?, "Batalla de Boyacá"), + ( + NaiveDate::from_ymd_res(2030, 8, 19)?, + "La Asunción (observado)", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Día de la Raza (observado)", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 4)?, + "Día de Todos los Santos (observado)", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 11)?, + "Independencia de Cartagena", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "La Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ], + &mut map, + Country::CO, + "Colombia", + ); + + Ok(map) +} diff --git a/src/data/cu.rs b/src/data/cu.rs new file mode 100644 index 0000000..62c8c1b --- /dev/null +++ b/src/data/cu.rs @@ -0,0 +1,1274 @@ +//! Cuba +use super::*; + +/// Generate holiday map for Cuba. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 11)?, + "Inicio de las Guerras de Independencia (observado)", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Día Internacional de los Trabajadores (observado)", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "Triunfo de la Revolución (observado)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2007, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "Día de la Victoria"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2008, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "Día de la Victoria"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2009, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "Día de la Victoria"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 11)?, + "Inicio de las Guerras de Independencia (observado)", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2010, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Día de la Victoria"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Día Internacional de los Trabajadores (observado)", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2011, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 1)?, + "Triunfo de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "Día de la Victoria; Triunfo de la Revolución (observado)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2012, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2013, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2014, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2015, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Día Internacional de los Trabajadores (observado)", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2016, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2017, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2019, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2020, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Inicio de las Guerras de Independencia (observado)", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2021, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Día Internacional de los Trabajadores (observado)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2022, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2023, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2024, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2025, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2026, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Inicio de las Guerras de Independencia (observado)", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2027, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2028, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2029, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 1)?, + "Triunfo de la Revolución", + ), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Día de la Victoria"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Día Internacional de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 25)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 26)?, + "Día de la Rebeldía Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 27)?, + "Conmemoración del asalto a Moncada", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 10)?, + "Inicio de las Guerras de Independencia", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2030, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::CU, + "Cuba", + ); + + Ok(map) +} diff --git a/src/data/cw.rs b/src/data/cw.rs new file mode 100644 index 0000000..825b4b1 --- /dev/null +++ b/src/data/cw.rs @@ -0,0 +1,1124 @@ +//! Curaçao +use super::*; + +/// Generate holiday map for Curaçao. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2000, 3, 6)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2000, 4, 23)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2000, 4, 29)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2000, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2001, 2, 26)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2001, 4, 15)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2001, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2001, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2002, 2, 11)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2002, 3, 31)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 1)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2002, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2002, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2003, 3, 3)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2003, 4, 20)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 21)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2003, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2003, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2004, 2, 23)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2004, 4, 11)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2004, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2004, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2005, 2, 7)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2005, 3, 27)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 28)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2005, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2005, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2006, 2, 27)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2006, 4, 16)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 17)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2006, 4, 29)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2006, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2007, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2007, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2008, 2, 4)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2008, 3, 23)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2008, 4, 30)?, "Dia di la Reina"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Dia di Asenshon; Dia di Obrero", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2009, 2, 23)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2009, 4, 12)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 13)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2009, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2009, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2010, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2010, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2010, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2011, 3, 7)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2011, 4, 24)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2011, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2011, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2012, 2, 20)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2012, 4, 9)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2012, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2012, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2012, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2013, 2, 11)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2013, 3, 31)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 1)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2013, 4, 30)?, "Dia di la Reina"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2013, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2013, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2014, 3, 3)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2014, 4, 20)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2014, 4, 26)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2014, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2014, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2015, 4, 6)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2015, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2015, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2015, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2016, 2, 8)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2016, 3, 27)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 28)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2016, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2016, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2017, 2, 27)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2017, 4, 16)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2017, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2017, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2017, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2018, 2, 12)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2018, 4, 2)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2018, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2018, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2018, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2019, 3, 4)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2019, 4, 21)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2019, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2019, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2019, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2020, 2, 24)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2020, 4, 12)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 13)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2020, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2020, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2020, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2021, 4, 5)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2021, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2021, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2021, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2022, 2, 28)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2022, 4, 17)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 18)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2022, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2022, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2023, 2, 20)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2023, 4, 10)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2023, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2023, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2023, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2024, 2, 12)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2024, 3, 31)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2024, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2024, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2024, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2025, 3, 3)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2025, 4, 20)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2025, 4, 26)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2025, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2025, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2026, 4, 6)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2026, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2026, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2026, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2027, 3, 28)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 29)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2027, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2027, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2027, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2028, 4, 16)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2028, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2028, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2028, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2029, 2, 12)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Bièrnèsantu"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Pasku di Resurekshon"), + ( + NaiveDate::from_ymd_res(2029, 4, 2)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2029, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2029, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2029, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Aña Nobo"), + ( + NaiveDate::from_ymd_res(2030, 3, 4)?, + "Dialuna despues di Carnaval Grandi", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Bièrnèsantu"), + ( + NaiveDate::from_ymd_res(2030, 4, 21)?, + "Pasku di Resurekshon", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Di dos dia di Pasku di Resurekshon", + ), + (NaiveDate::from_ymd_res(2030, 4, 27)?, "Dia di Rey"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Dia di Obrero"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Dia di Asenshon"), + ( + NaiveDate::from_ymd_res(2030, 7, 2)?, + "Dia di Himno i Bandera", + ), + (NaiveDate::from_ymd_res(2030, 10, 10)?, "Dia di Pais Kòrsou"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Pasku di Nasementu"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Di dos dia di Pasku di Nasementu", + ), + ], + &mut map, + Country::CW, + "Curaçao", + ); + + Ok(map) +} diff --git a/src/data/cy.rs b/src/data/cy.rs new file mode 100644 index 0000000..565358e --- /dev/null +++ b/src/data/cy.rs @@ -0,0 +1,1348 @@ +//! Cyprus +use super::*; + +/// Generate holiday map for Cyprus. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2000, 3, 13)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2000, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2000, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2000, 4, 28)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Δευτέρα της Διακαινησίμου; Πρωτομαγιά", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 19)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2000, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2001, 2, 26)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2001, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2001, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2001, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2002, 3, 18)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2002, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2002, 5, 6)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2002, 6, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2002, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2003, 3, 10)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2003, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2003, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2003, 6, 16)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2003, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2004, 2, 23)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2004, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2004, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2004, 5, 31)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2004, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2005, 3, 14)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2005, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2005, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2005, 4, 29)?, "Μεγάλη Παρασκευή"), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Κυριακή του Πάσχα; Πρωτομαγιά", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Δευτέρα της Διακαινησίμου", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 20)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2005, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2006, 3, 6)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2006, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2006, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2006, 6, 12)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2006, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2007, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2007, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2007, 5, 28)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2007, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2008, 3, 10)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2008, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2008, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2008, 6, 16)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2008, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2009, 3, 2)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2009, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2009, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2009, 4, 17)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2009, 4, 20)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2009, 6, 8)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2009, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2010, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2010, 5, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2010, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2011, 3, 7)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2011, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2011, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2011, 6, 13)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2011, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2012, 2, 27)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2012, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2012, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2012, 4, 13)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2012, 4, 16)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2012, 6, 4)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2012, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2013, 3, 18)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2013, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2013, 5, 3)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2013, 5, 6)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2013, 6, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2013, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2014, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2014, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2014, 6, 9)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2014, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2015, 2, 23)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2015, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2015, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2015, 4, 10)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2015, 4, 13)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2015, 6, 1)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2015, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2016, 3, 14)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2016, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2016, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "Μεγάλη Παρασκευή"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Κυριακή του Πάσχα; Πρωτομαγιά", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Δευτέρα της Διακαινησίμου", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 20)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2016, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2017, 2, 27)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2017, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2017, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2017, 6, 5)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2017, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2018, 2, 19)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2018, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2018, 4, 9)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2018, 5, 28)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2018, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2019, 3, 11)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2019, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2019, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2019, 4, 29)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2019, 6, 17)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2019, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2020, 3, 2)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2020, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2020, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2020, 4, 17)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2020, 4, 20)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2020, 6, 8)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2020, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2021, 3, 15)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2021, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2021, 6, 21)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2021, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2022, 3, 7)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2022, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2022, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2022, 6, 13)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2022, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2023, 2, 27)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2023, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2023, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2023, 4, 17)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2023, 6, 5)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2023, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2024, 3, 18)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2024, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2024, 5, 6)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2024, 6, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2024, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2025, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2025, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2025, 6, 9)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2025, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2026, 2, 23)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2026, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2026, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2026, 4, 10)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2026, 4, 13)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2026, 6, 1)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2026, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2027, 3, 15)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2027, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2027, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2027, 4, 30)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2027, 5, 3)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2027, 6, 21)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2027, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2028, 2, 28)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2028, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2028, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2028, 6, 5)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2028, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2029, 2, 19)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2029, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2029, 4, 9)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2029, 5, 28)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2029, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Ημέρα των Θεοφανίων"), + (NaiveDate::from_ymd_res(2030, 3, 11)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2030, 3, 25)?, + "Ημέρα της Ελληνικής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2030, 4, 1)?, "Εθνική Ημέρα Κύπρου"), + (NaiveDate::from_ymd_res(2030, 4, 26)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "Κυριακή του Πάσχα"), + ( + NaiveDate::from_ymd_res(2030, 4, 29)?, + "Δευτέρα της Διακαινησίμου", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2030, 6, 17)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 1)?, + "Ημέρα της Κυπριακής Ανεξαρτησίας", + ), + (NaiveDate::from_ymd_res(2030, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Επομένη Χριστουγέννων", + ), + ], + &mut map, + Country::CY, + "Cyprus", + ); + + Ok(map) +} diff --git a/src/data/cz.rs b/src/data/cz.rs new file mode 100644 index 0000000..3c9d059 --- /dev/null +++ b/src/data/cz.rs @@ -0,0 +1,1174 @@ +//! Czechia +use super::*; + +/// Generate holiday map for Czechia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2000, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2000, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2000, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2000, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2001, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2001, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2001, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2001, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2002, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2002, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2002, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2002, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2003, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2003, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2003, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2003, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2004, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2004, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2004, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2004, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2005, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2005, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2005, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2005, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2006, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2006, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2006, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2006, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2007, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2007, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2007, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2007, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2008, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2008, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2008, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2008, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2009, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2009, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2009, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2009, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2010, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2010, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2010, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2010, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2011, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2011, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2011, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2011, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2012, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2012, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2012, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2012, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2013, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2013, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2013, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2013, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2014, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2014, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2014, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2014, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2015, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2015, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2015, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2015, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2016, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2016, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2016, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2016, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2017, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2017, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2017, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2017, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2018, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2018, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2018, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2018, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2019, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2019, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2019, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2019, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2020, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2020, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2020, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2021, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2021, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2021, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2021, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2022, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2022, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2022, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2022, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2023, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2023, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2023, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2023, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2024, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2024, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2024, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2024, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2025, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2025, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2025, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2025, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2026, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2026, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2026, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2026, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2027, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2027, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2027, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2027, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2028, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2028, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2028, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2028, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2029, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2029, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2029, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2029, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 1)?, + "Den obnovy samostatného českého státu", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Velký pátek"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Velikonoční pondělí"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Svátek práce"), + (NaiveDate::from_ymd_res(2030, 5, 8)?, "Den vítězství"), + ( + NaiveDate::from_ymd_res(2030, 7, 5)?, + "Den slovanských věrozvěstů Cyrila a Metoděje", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 6)?, + "Den upálení mistra Jana Husa", + ), + (NaiveDate::from_ymd_res(2030, 9, 28)?, "Den české státnosti"), + ( + NaiveDate::from_ymd_res(2030, 10, 28)?, + "Den vzniku samostatného československého státu", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 17)?, + "Den boje za svobodu a demokracii", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Štědrý den"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "1. svátek vánoční"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "2. svátek vánoční"), + ], + &mut map, + Country::CZ, + "Czechia", + ); + + Ok(map) +} diff --git a/src/data/de.rs b/src/data/de.rs new file mode 100644 index 0000000..09fc116 --- /dev/null +++ b/src/data/de.rs @@ -0,0 +1,883 @@ +//! Germany +use super::*; + +/// Generate holiday map for Germany. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2000, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2001, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2002, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2003, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2004, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2005, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2006, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2007, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Ostermontag"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Christi Himmelfahrt; Erster Mai", + ), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2008, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2009, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2010, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2011, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2012, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2013, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2014, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2015, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2016, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2017, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Zweiter Weihnachtstag", + ), + (NaiveDate::from_ymd_res(2017, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2018, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2019, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2020, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2021, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2022, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2023, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2024, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2025, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2026, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2027, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2028, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2029, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Karfreitag"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Erster Mai"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Pfingstmontag"), + ( + NaiveDate::from_ymd_res(2030, 10, 3)?, + "Tag der Deutschen Einheit", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 25)?, + "Erster Weihnachtstag", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Zweiter Weihnachtstag", + ), + ], + &mut map, + Country::DE, + "Germany", + ); + + Ok(map) +} diff --git a/src/data/dj.rs b/src/data/dj.rs new file mode 100644 index 0000000..7e2972e --- /dev/null +++ b/src/data/dj.rs @@ -0,0 +1,1544 @@ +//! Djibouti +use super::*; + +/// Generate holiday map for Djibouti. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2000, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2000, 10, 24)?, + "Al Isra et Al Mirague (estimé)", + ), + (NaiveDate::from_ymd_res(2000, 1, 8)?, "Eid al-Fitr (estimé)"), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2000, 3, 15)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2001, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2001, 10, 14)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2001, 3, 4)?, "Arafat (estimé)"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "Eid al-Adha (estimé)"), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 26)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2002, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2002, 10, 4)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2002, 2, 21)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2002, 2, 22)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 15)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2003, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2003, 9, 24)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2003, 2, 10)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2003, 2, 11)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 4)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nouvel an"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Anniversaire du prophète Muhammad (estimé); Fête du travail", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2004, 9, 12)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2004, 1, 31)?, "Arafat (estimé)"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "Eid al-Adha (estimé)"), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 21)?, + "Nouvel an musulman (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2005, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2005, 9, 1)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 3)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2005, 1, 21)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 22)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2006, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2006, 8, 21)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 23)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2006, 1, 9)?, "Arafat (estimé)"), + (NaiveDate::from_ymd_res(2006, 12, 30)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2006, 1, 10)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 31)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 10)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Eid al-Adha deuxième jour (estimé); Nouvel an", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2007, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2007, 8, 10)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 13)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2007, 12, 19)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2007, 12, 20)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 21)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 20)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2008, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2008, 7, 30)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2008, 12, 7)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 9)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 10)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 29)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2009, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2009, 7, 20)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 20)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2009, 11, 26)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 28)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 18)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2010, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2010, 7, 9)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 10)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2010, 11, 15)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2010, 11, 16)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 7)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2011, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2011, 6, 29)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2011, 11, 5)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 26)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2012, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2012, 6, 17)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 19)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2012, 10, 25)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2012, 10, 26)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 27)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 15)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 4)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2013, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2013, 6, 6)?, + "Al Isra et Al Mirague (estimé)", + ), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Eid al-Fitr (estimé)"), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2013, 10, 15)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 16)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2014, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2014, 5, 26)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 28)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2014, 10, 4)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 5)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 25)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 13)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2015, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2015, 5, 16)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 17)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2015, 9, 22)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2015, 9, 23)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 24)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 14)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 3)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 23)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2016, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2016, 5, 4)?, + "Al Isra et Al Mirague (estimé)", + ), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Eid al-Fitr (estimé)"), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2016, 9, 10)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2016, 9, 11)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 2)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 11)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2017, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 25)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2017, 8, 31)?, "Arafat (estimé)"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "Eid al-Adha (estimé)"), + ( + NaiveDate::from_ymd_res(2017, 9, 2)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 21)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 30)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2018, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2018, 4, 13)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 15)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2018, 8, 20)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2018, 8, 21)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 22)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 11)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 20)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2019, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2019, 4, 3)?, + "Al Isra et Al Mirague (estimé)", + ), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "Eid al-Fitr (estimé)"), + ( + NaiveDate::from_ymd_res(2019, 6, 5)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2019, 8, 10)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2019, 8, 11)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 31)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2020, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2020, 3, 22)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 24)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2020, 7, 30)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2020, 7, 31)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 1)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 20)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 29)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2021, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2021, 3, 11)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2021, 7, 19)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 9)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2022, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2022, 2, 28)?, + "Al Isra et Al Mirague (estimé)", + ), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Eid al-Fitr (estimé)"), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2022, 7, 8)?, "Arafat (estimé)"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "Eid al-Adha (estimé)"), + ( + NaiveDate::from_ymd_res(2022, 7, 10)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 30)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 8)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2023, 6, 27)?, + "Arafat (estimé); Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 28)?, + "Eid al-Adha (estimé); Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2023, 2, 18)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 21)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 22)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 19)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 27)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2024, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2024, 2, 8)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 10)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2024, 6, 15)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 7)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2025, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2025, 1, 27)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2025, 6, 5)?, "Arafat (estimé)"), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "Eid al-Adha (estimé)"), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2026, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2026, 1, 16)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2026, 5, 26)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 16)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2027, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Al Isra et Al Mirague (estimé); Noël", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 5)?, + "Al Isra et Al Mirague (estimé)", + ), + (NaiveDate::from_ymd_res(2027, 3, 9)?, "Eid al-Fitr (estimé)"), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2027, 5, 15)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2028, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2028, 12, 14)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2028, 5, 4)?, "Arafat (estimé)"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "Eid al-Adha (estimé)"), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2029, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2029, 12, 3)?, + "Al Isra et Al Mirague (estimé)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Eid al-Fitr (estimé)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2029, 4, 23)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nouvel an"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Fête du travail"), + ( + NaiveDate::from_ymd_res(2030, 6, 27)?, + "Fête de l'indépendance", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 28)?, + "Fête de l'indépendance deuxième jour", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Noël"), + ( + NaiveDate::from_ymd_res(2030, 11, 23)?, + "Al Isra et Al Mirague (estimé)", + ), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "Eid al-Fitr (estimé)"), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Eid al-Fitr deuxième jour (estimé)", + ), + (NaiveDate::from_ymd_res(2030, 4, 12)?, "Arafat (estimé)"), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Eid al-Adha (estimé)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "Eid al-Adha deuxième jour (estimé)", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "Nouvel an musulman (estimé)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "Anniversaire du prophète Muhammad (estimé)", + ), + ], + &mut map, + Country::DJ, + "Djibouti", + ); + + Ok(map) +} diff --git a/src/data/dk.rs b/src/data/dk.rs new file mode 100644 index 0000000..b35b2fb --- /dev/null +++ b/src/data/dk.rs @@ -0,0 +1,749 @@ +//! Denmark +use super::*; + +/// Generate holiday map for Denmark. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Langfredag"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Påskedag"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2000, 5, 19)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2000, 6, 1)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Langfredag"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Påskedag"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2001, 5, 11)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2001, 5, 24)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Langfredag"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Påskedag"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2002, 4, 26)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Langfredag"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Påskedag"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2003, 5, 16)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2003, 5, 29)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Langfredag"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Påskedag"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2004, 5, 7)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2004, 5, 20)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Langfredag"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Påskedag"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2005, 4, 22)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2005, 5, 5)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Langfredag"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Påskedag"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2006, 5, 12)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Langfredag"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Påskedag"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2007, 5, 4)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2007, 5, 17)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Langfredag"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Påskedag"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2008, 4, 18)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Langfredag"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Påskedag"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2009, 5, 8)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2009, 5, 21)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Langfredag"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Påskedag"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2010, 4, 30)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2010, 5, 13)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Langfredag"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Påskedag"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2011, 5, 20)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2011, 6, 2)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Langfredag"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Påskedag"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2012, 5, 4)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2012, 5, 17)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Langfredag"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Påskedag"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2013, 4, 26)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Langfredag"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Påskedag"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2014, 5, 16)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2014, 5, 29)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Langfredag"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Påskedag"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2015, 5, 14)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Langfredag"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Påskedag"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2016, 4, 22)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2016, 5, 5)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Langfredag"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Påskedag"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2017, 5, 12)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Langfredag"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Påskedag"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2018, 4, 27)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2018, 5, 10)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Langfredag"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Påskedag"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2019, 5, 17)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2019, 5, 30)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Langfredag"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Påskedag"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2020, 5, 21)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Langfredag"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Påskedag"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Langfredag"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Påskedag"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2022, 5, 13)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2022, 5, 26)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Langfredag"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Påskedag"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Anden påskedag"), + (NaiveDate::from_ymd_res(2023, 5, 5)?, "Store bededag"), + ( + NaiveDate::from_ymd_res(2023, 5, 18)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Langfredag"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Påskedag"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Anden påskedag"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Langfredag"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Påskedag"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Anden påskedag"), + ( + NaiveDate::from_ymd_res(2025, 5, 29)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Langfredag"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Påskedag"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Anden påskedag"), + ( + NaiveDate::from_ymd_res(2026, 5, 14)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Langfredag"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Påskedag"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Anden påskedag"), + ( + NaiveDate::from_ymd_res(2027, 5, 6)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Langfredag"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Påskedag"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Anden påskedag"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Langfredag"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Påskedag"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Anden påskedag"), + ( + NaiveDate::from_ymd_res(2029, 5, 10)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nytårsdag"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Skærtorsdag"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Langfredag"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Påskedag"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Anden påskedag"), + ( + NaiveDate::from_ymd_res(2030, 5, 30)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pinsedag"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Anden pinsedag"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Juledag"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Anden juledag"), + ], + &mut map, + Country::DK, + "Denmark", + ); + + Ok(map) +} diff --git a/src/data/do.rs b/src/data/do.rs new file mode 100644 index 0000000..239eb40 --- /dev/null +++ b/src/data/do.rs @@ -0,0 +1,1159 @@ +//! Dominican Republic +use super::*; + +/// Generate holiday map for Dominican Republic. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2000, 1, 24)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2000, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2000, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2000, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2000, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2001, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2001, 1, 29)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2001, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2001, 4, 30)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2001, 8, 20)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2001, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2001, 11, 5)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2002, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2002, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2002, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2002, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2002, 4, 29)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2002, 8, 19)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2002, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2002, 11, 4)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2003, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2003, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2003, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2003, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2003, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2003, 11, 10)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2004, 1, 5)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2004, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2004, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2004, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2004, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2004, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2005, 1, 10)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2005, 1, 24)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2005, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2005, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2005, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2006, 1, 9)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2006, 1, 30)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2006, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2006, 8, 14)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2006, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2006, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2007, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2007, 1, 29)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2007, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2007, 4, 30)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2007, 8, 20)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2007, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2007, 11, 5)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2008, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2008, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2008, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2008, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2008, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2008, 11, 10)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2009, 1, 5)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2009, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2009, 5, 4)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2009, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2009, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2009, 11, 9)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2010, 1, 4)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2010, 1, 25)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2010, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2010, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2010, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2010, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2011, 1, 10)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2011, 1, 24)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2011, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2011, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2012, 1, 9)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2012, 1, 30)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2012, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2012, 4, 30)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2012, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2012, 11, 5)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2013, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2013, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2013, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2013, 4, 29)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2013, 8, 19)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2013, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2014, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2014, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2014, 5, 5)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2014, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2014, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2014, 11, 10)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2015, 1, 5)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2015, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2015, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2015, 5, 4)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2015, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2015, 11, 9)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2016, 1, 4)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2016, 1, 25)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2016, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2016, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2016, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2017, 1, 9)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2017, 1, 30)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2017, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2017, 8, 14)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2017, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2017, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2018, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2018, 1, 29)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2018, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2018, 4, 30)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2018, 8, 20)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2018, 11, 5)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2019, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2019, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2019, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2019, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2019, 8, 19)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2019, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2019, 11, 4)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2020, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2020, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2020, 5, 4)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2020, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2020, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2020, 11, 9)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2021, 1, 4)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2021, 1, 25)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2021, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2021, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2021, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2021, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2022, 1, 10)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2022, 1, 24)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2022, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2022, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2022, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2023, 1, 9)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2023, 1, 30)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2023, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2023, 8, 14)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2023, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2023, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2024, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2024, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2024, 1, 29)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2024, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2024, 4, 29)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2024, 8, 19)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2024, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2024, 11, 4)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2025, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2025, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2025, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2025, 5, 5)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2025, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2025, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2025, 11, 10)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2026, 1, 5)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2026, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2026, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2026, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2026, 5, 4)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2026, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2026, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2026, 11, 9)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2027, 1, 4)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2027, 1, 25)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2027, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2027, 8, 16)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2027, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2027, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2028, 1, 10)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2028, 1, 24)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2028, 8, 14)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2028, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2028, 11, 6)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2029, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2029, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2029, 1, 29)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2029, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2029, 4, 30)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2029, 8, 20)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2029, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2029, 11, 5)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2030, 1, 6)?, + "Día de los Santos Reyes", + ), + ( + NaiveDate::from_ymd_res(2030, 1, 21)?, + "Día de la Altagracia", + ), + (NaiveDate::from_ymd_res(2030, 1, 26)?, "Día de Duarte"), + ( + NaiveDate::from_ymd_res(2030, 2, 27)?, + "Día de Independencia", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "Día del Trabajo"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Corpus Christi"), + ( + NaiveDate::from_ymd_res(2030, 8, 19)?, + "Día de la Restauración", + ), + (NaiveDate::from_ymd_res(2030, 9, 24)?, "Día de las Mercedes"), + ( + NaiveDate::from_ymd_res(2030, 11, 4)?, + "Día de la Constitución", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Día de Navidad"), + ], + &mut map, + Country::DO, + "Dominican Republic", + ); + + Ok(map) +} diff --git a/src/data/ee.rs b/src/data/ee.rs new file mode 100644 index 0000000..d38c884 --- /dev/null +++ b/src/data/ee.rs @@ -0,0 +1,875 @@ +//! Estonia +use super::*; + +/// Generate holiday map for Estonia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2000, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2000, 4, 23)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2000, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2000, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2000, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2001, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2001, 4, 15)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2001, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2001, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2001, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2002, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2002, 3, 31)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2002, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2002, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2002, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2003, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2003, 4, 20)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2003, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2003, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2003, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2004, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2004, 4, 11)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2004, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2004, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2004, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2005, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2005, 3, 27)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2005, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2005, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2005, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2006, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2006, 4, 16)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2006, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2006, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2006, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2007, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2007, 4, 8)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2007, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2007, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2007, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2008, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2008, 3, 23)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2008, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2008, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2008, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2009, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2009, 4, 12)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2009, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2009, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2009, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2010, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2010, 4, 4)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2010, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2010, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2010, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2011, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2011, 4, 24)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2011, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2011, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2012, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2012, 4, 8)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2012, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2013, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2013, 3, 31)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2013, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2013, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2013, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2014, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2014, 4, 20)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2014, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2014, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2014, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2015, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2015, 4, 5)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2015, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2015, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2015, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2016, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2016, 3, 27)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2016, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2016, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2016, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2017, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2017, 4, 16)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2017, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2017, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2017, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2018, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2018, 4, 1)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2018, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2018, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2018, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2019, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2019, 4, 21)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2019, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2019, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2019, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2020, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2020, 4, 12)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2020, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2020, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2020, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2021, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2021, 4, 4)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2021, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2021, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2021, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2022, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2022, 4, 17)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2022, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2022, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2022, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2023, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2023, 4, 9)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2023, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2023, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2023, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2024, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2024, 3, 31)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2024, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2024, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2024, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2025, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2025, 4, 20)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2025, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2025, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2025, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2026, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2026, 4, 5)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2026, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2026, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2026, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2027, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2027, 3, 28)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2027, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2027, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2027, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2028, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2028, 4, 16)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2028, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2028, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2028, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2029, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2029, 4, 1)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2029, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2029, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2029, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "uusaasta"), + (NaiveDate::from_ymd_res(2030, 2, 24)?, "iseseisvuspäev"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "suur reede"), + ( + NaiveDate::from_ymd_res(2030, 4, 21)?, + "ülestõusmispühade 1. püha", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "kevadpüha"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "nelipühade 1. püha"), + (NaiveDate::from_ymd_res(2030, 6, 23)?, "võidupüha"), + (NaiveDate::from_ymd_res(2030, 6, 24)?, "jaanipäev"), + ( + NaiveDate::from_ymd_res(2030, 8, 20)?, + "taasiseseisvumispäev", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "jõululaupäev"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "esimene jõulupüha"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "teine jõulupüha"), + ], + &mut map, + Country::EE, + "Estonia", + ); + + Ok(map) +} diff --git a/src/data/eg.rs b/src/data/eg.rs new file mode 100644 index 0000000..05b8840 --- /dev/null +++ b/src/data/eg.rs @@ -0,0 +1,1571 @@ +//! Egypt +use super::*; + +/// Generate holiday map for Egypt. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2000, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "عيد الفصح القبطي"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "شم النسيم; عيد العمال", + ), + (NaiveDate::from_ymd_res(2000, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2000, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2000, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2000, 1, 8)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2000, 12, 27)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2000, 3, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2000, 3, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2001, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2001, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2001, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2001, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2001, 3, 4)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2002, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2002, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2002, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2002, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2002, 12, 5)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2002, 2, 21)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2002, 2, 22)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2003, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2003, 4, 28)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2003, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2003, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2003, 2, 10)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2004, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2004, 4, 25)?, "عيد تحرير سيناء"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "(تقدير) عيد المولد النبوي; عيد العمال", + ), + (NaiveDate::from_ymd_res(2004, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2004, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2004, 1, 31)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 3)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 21)?, + "(تقدير) رأس السنة الهجرية", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2005, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "عيد العمال; عيد الفصح القبطي", + ), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2005, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2005, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2005, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2005, 1, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2006, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2006, 4, 24)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2006, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2006, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2006, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2006, 1, 9)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2006, 12, 30)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 31)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 10)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "(تقدير) عطلة عيد الأضحى; رأس السنة الميلادية", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2007, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2007, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2007, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2007, 12, 19)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2007, 12, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 20)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2008, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2008, 4, 28)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2008, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2008, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2008, 12, 7)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2008, 12, 9)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 29)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2009, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2009, 1, 25)?, "عيد الشرطة"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2009, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2009, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2009, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2009, 11, 26)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2009, 11, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 18)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2010, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2010, 1, 25)?, "عيد الشرطة"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2010, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2010, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2010, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2010, 11, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2011, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2011, 1, 25)?, "عيد الشرطة"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "عيد الفصح القبطي"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "شم النسيم; عيد تحرير سيناء", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2011, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2011, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2011, 11, 5)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2012, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2012, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2012, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2012, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2012, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2012, 10, 25)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2012, 10, 27)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2013, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2013, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2013, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2013, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2013, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2013, 10, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2014, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2014, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2014, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "عيد العمال"), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "(تقدير) عطلة عيد الأضحى; عيد القوات المسلحة", + ), + (NaiveDate::from_ymd_res(2014, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2014, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 30)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2014, 10, 5)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2015, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2015, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2015, 4, 13)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2015, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2015, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2015, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2015, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 19)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2015, 9, 22)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2015, 9, 23)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2015, 9, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 25)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 23)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2016, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2016, 1, 25)?, "عيد ثورة 25 يناير"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "عيد العمال; عيد الفصح القبطي", + ), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2016, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2016, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2016, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2016, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2016, 9, 10)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2016, 9, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 2)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 11)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2017, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2017, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2017, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2017, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2017, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2017, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2017, 8, 31)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2017, 9, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 3)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 21)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 30)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2018, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2018, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2018, 4, 9)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2018, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2018, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2018, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2018, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2018, 8, 20)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2018, 8, 21)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2018, 8, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 11)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 20)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2019, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2019, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2019, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2019, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2019, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2019, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2019, 6, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2019, 8, 10)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 31)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2020, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2020, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2020, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2020, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2020, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2020, 7, 30)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2020, 8, 1)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 20)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 29)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2021, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2021, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2021, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2021, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2021, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2021, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2021, 7, 19)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 9)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2022, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2022, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "عيد الفصح القبطي"), + ( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "شم النسيم; عيد تحرير سيناء", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2022, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2022, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2022, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2022, 7, 8)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2022, 7, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 30)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 8)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2023, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2023, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2023, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2023, 10, 6)?, "عيد القوات المسلحة"), + ( + NaiveDate::from_ymd_res(2023, 6, 30)?, + "(تقدير) عطلة عيد الأضحى; عيد ثورة 30 يونيو", + ), + (NaiveDate::from_ymd_res(2023, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2023, 4, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 23)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2023, 6, 27)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 19)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 27)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2024, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2024, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2024, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2024, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2024, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2024, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2024, 6, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2025, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2025, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2025, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2025, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2025, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2025, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2025, 3, 30)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2025, 6, 5)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2026, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2026, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2026, 4, 13)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2026, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2026, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2026, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2026, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2026, 3, 20)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2026, 5, 26)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2026, 5, 27)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 16)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2027, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2027, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2027, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2027, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2027, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2027, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2027, 3, 9)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2027, 5, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2028, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2028, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2028, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2028, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2028, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2028, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2028, 2, 26)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2028, 5, 4)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2029, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2029, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2029, 4, 9)?, "شم النسيم"), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "(تقدير) عطلة عيد الأضحى; عيد تحرير سيناء", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2029, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2029, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2029, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2029, 4, 23)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2029, 4, 24)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2029, 4, 26)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2030, 1, 7)?, + "عيد الميلاد المجيد (تقويم قبطي)", + ), + (NaiveDate::from_ymd_res(2030, 1, 25)?, "عيد ثورة 25 يناير"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "عيد الفصح القبطي"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "شم النسيم"), + (NaiveDate::from_ymd_res(2030, 4, 25)?, "عيد تحرير سيناء"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2030, 10, 6)?, "عيد القوات المسلحة"), + (NaiveDate::from_ymd_res(2030, 6, 30)?, "عيد ثورة 30 يونيو"), + (NaiveDate::from_ymd_res(2030, 7, 23)?, "عيد ثورة 23 يوليو"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2030, 4, 12)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2030, 4, 13)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::EG, + "Egypt", + ); + + Ok(map) +} diff --git a/src/data/es.rs b/src/data/es.rs new file mode 100644 index 0000000..0af5838 --- /dev/null +++ b/src/data/es.rs @@ -0,0 +1,1043 @@ +//! Spain +use super::*; + +/// Generate holiday map for Spain. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2000, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2001, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2003, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2004, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2005, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2006, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2007, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2008, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2009, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2010, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2010, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2011, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "Inmaculada Concepción", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2012, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2013, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Asunción de la Virgen", + ), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2014, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Fiesta Nacional de España", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2016, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "Inmaculada Concepción", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2017, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2018, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2019, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Fiesta Nacional de España", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2021, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2021, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2022, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "Inmaculada Concepción", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2023, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2024, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2025, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2026, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2027, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2028, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2029, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año nuevo"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Epifanía del Señor"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Fiesta del Trabajo"), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Asunción de la Virgen", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 12)?, + "Fiesta Nacional de España", + ), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Todos los Santos"), + ( + NaiveDate::from_ymd_res(2030, 12, 6)?, + "Día de la Constitución Española", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "Inmaculada Concepción", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 25)?, + "Natividad del Señor", + ), + ], + &mut map, + Country::ES, + "Spain", + ); + + Ok(map) +} diff --git a/src/data/et.rs b/src/data/et.rs new file mode 100644 index 0000000..e689951 --- /dev/null +++ b/src/data/et.rs @@ -0,0 +1,723 @@ +//! Ethiopia +use super::*; + +/// Generate holiday map for Ethiopia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2000, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2000, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2000, 4, 28)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2000, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2000, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2000, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2000, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2000, 1, 8)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2000, 12, 27)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2000, 3, 16)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2000, 6, 14)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2001, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2001, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2001, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2001, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2001, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2001, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2002, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2002, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "የአርበኞች ቀን; ፋሲካ"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2002, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2002, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2002, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2002, 12, 5)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2002, 2, 22)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2002, 5, 24)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2003, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2003, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2003, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2003, 9, 12)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2003, 9, 28)?, "መስቀል"), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2003, 5, 13)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2004, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2004, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "ፋሲካ"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "መውሊድ (ግምት); የሰራተኞች ቀን", + ), + (NaiveDate::from_ymd_res(2004, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2004, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2004, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2004, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "አረፋ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2005, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2005, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2005, 4, 29)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "የሰራተኞች ቀን; ፋሲካ"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2005, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2005, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2005, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2005, 4, 21)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2006, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2006, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2006, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2006, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2006, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2006, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2006, 4, 10)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2007, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2007, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2007, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2007, 9, 12)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2007, 9, 28)?, "መስቀል"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2007, 3, 31)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2008, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2008, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2008, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2008, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2008, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2009, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2009, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2009, 4, 17)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2009, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2009, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2009, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2009, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2009, 3, 9)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2010, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2010, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2010, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2010, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2010, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2010, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2010, 2, 26)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2011, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2011, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2011, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2011, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2011, 9, 12)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2011, 9, 28)?, "መስቀል"), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2011, 2, 15)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2012, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2012, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2012, 4, 13)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2012, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2012, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2012, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2012, 2, 4)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2013, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2013, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2013, 5, 3)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "የአርበኞች ቀን; ፋሲካ"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2013, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2013, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2013, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2013, 1, 24)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2014, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2014, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2014, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2014, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2014, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2014, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2014, 1, 13)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2015, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2015, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2015, 4, 10)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2015, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2015, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2015, 9, 12)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2015, 9, 28)?, "መስቀል"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2015, 9, 23)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2015, 1, 3)?, "መውሊድ (ግምት)"), + (NaiveDate::from_ymd_res(2015, 12, 23)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2016, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2016, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "የሰራተኞች ቀን; ፋሲካ"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2016, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2016, 9, 11)?, "አረፋ (ግምት); እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2016, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2016, 12, 11)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2017, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2017, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2017, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2017, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2017, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2017, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2017, 11, 30)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2018, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2018, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2018, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2018, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2018, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "ኢድ አልፈጥር"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "አረፋ"), + (NaiveDate::from_ymd_res(2018, 11, 21)?, "መውሊድ"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2019, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2019, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2019, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2019, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2019, 9, 12)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2019, 9, 28)?, "መስቀል"), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "ኢድ አልፈጥር"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "አረፋ"), + (NaiveDate::from_ymd_res(2019, 11, 10)?, "መውሊድ"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2020, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2020, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2020, 4, 17)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2020, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2020, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2020, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2020, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "ኢድ አልፈጥር"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "አረፋ"), + (NaiveDate::from_ymd_res(2020, 10, 29)?, "መውሊድ"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2021, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2021, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2021, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2021, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2021, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2021, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "ኢድ አልፈጥር"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "አረፋ"), + (NaiveDate::from_ymd_res(2021, 10, 18)?, "መውሊድ"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2022, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2022, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2022, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2022, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2022, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2022, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "ኢድ አልፈጥር"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "አረፋ"), + (NaiveDate::from_ymd_res(2022, 10, 8)?, "መውሊድ"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2023, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2023, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2023, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2023, 9, 12)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2023, 9, 28)?, "መስቀል"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "ኢድ አልፈጥር"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "አረፋ"), + (NaiveDate::from_ymd_res(2023, 9, 27)?, "መውሊድ"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2024, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2024, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "የአርበኞች ቀን; ፋሲካ"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2024, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2024, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2024, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "ኢድ አልፈጥር"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2024, 9, 15)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2025, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2025, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2025, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2025, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2025, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2025, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2025, 3, 30)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2025, 9, 4)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2026, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2026, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2026, 4, 10)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2026, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2026, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2026, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2026, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2026, 3, 20)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2026, 5, 27)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2026, 8, 25)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2027, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2027, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2027, 4, 30)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2027, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2027, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2027, 9, 12)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2027, 9, 28)?, "መስቀል"), + (NaiveDate::from_ymd_res(2027, 3, 9)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2027, 8, 14)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2028, 1, 20)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2028, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "አረፋ (ግምት); የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2028, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2028, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2028, 2, 26)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2028, 8, 3)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2029, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2029, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2029, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2029, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2029, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2029, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2029, 4, 24)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2029, 7, 24)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 7)?, "ገና"), + (NaiveDate::from_ymd_res(2030, 1, 19)?, "ጥምቀት"), + (NaiveDate::from_ymd_res(2030, 3, 2)?, "አድዋ"), + (NaiveDate::from_ymd_res(2030, 4, 26)?, "ስቅለት"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "ፋሲካ"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "የሰራተኞች ቀን"), + (NaiveDate::from_ymd_res(2030, 5, 5)?, "የአርበኞች ቀን"), + (NaiveDate::from_ymd_res(2030, 5, 28)?, "ደርግ የወደቀበት ቀን"), + (NaiveDate::from_ymd_res(2030, 9, 11)?, "እንቁጣጣሽ"), + (NaiveDate::from_ymd_res(2030, 9, 27)?, "መስቀል"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "ኢድ አልፈጥር (ግምት)"), + (NaiveDate::from_ymd_res(2030, 4, 13)?, "አረፋ (ግምት)"), + (NaiveDate::from_ymd_res(2030, 7, 13)?, "መውሊድ (ግምት)"), + ], + &mut map, + Country::ET, + "Ethiopia", + ); + + Ok(map) +} diff --git a/src/data/fi.rs b/src/data/fi.rs new file mode 100644 index 0000000..3a0c930 --- /dev/null +++ b/src/data/fi.rs @@ -0,0 +1,786 @@ +//! Finland +use super::*; + +/// Generate holiday map for Finland. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2000, 6, 23)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2000, 6, 24)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2000, 11, 4)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2000, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2001, 6, 22)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2001, 6, 23)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2001, 11, 3)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2001, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2002, 6, 21)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2002, 6, 22)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2002, 11, 2)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2002, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2003, 6, 20)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2003, 6, 21)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2003, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2004, 6, 25)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2004, 6, 26)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2004, 11, 6)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2004, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2005, 6, 24)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2005, 6, 25)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2005, 11, 5)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2005, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2006, 6, 23)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2006, 6, 24)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2006, 11, 4)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2006, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2007, 6, 22)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2007, 6, 23)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2007, 11, 3)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2007, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Helatorstai; Vappu"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2008, 6, 20)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2008, 6, 21)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2008, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2009, 6, 19)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2009, 6, 20)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2009, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2010, 6, 25)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2010, 6, 26)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2010, 11, 6)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2010, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2011, 6, 24)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2011, 6, 25)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2011, 11, 5)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2011, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2012, 6, 22)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2012, 11, 3)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2012, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2013, 6, 21)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2013, 6, 22)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2013, 11, 2)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2013, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2014, 6, 20)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2014, 6, 21)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2014, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2015, 6, 19)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2015, 6, 20)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2015, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2016, 6, 24)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2016, 6, 25)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2016, 11, 5)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2016, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2017, 6, 23)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2017, 6, 24)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2017, 11, 4)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2017, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2018, 6, 22)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2018, 6, 23)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2018, 11, 3)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2018, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2019, 6, 21)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2019, 6, 22)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2019, 11, 2)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2019, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2020, 6, 19)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2020, 6, 20)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2020, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2021, 6, 25)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2021, 6, 26)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2021, 11, 6)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2021, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2022, 6, 24)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2022, 6, 25)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2022, 11, 5)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2022, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2023, 6, 23)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2023, 6, 24)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2023, 11, 4)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2023, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2024, 6, 21)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2024, 6, 22)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2024, 11, 2)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2024, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2025, 6, 20)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2025, 6, 21)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2025, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2026, 6, 19)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2026, 6, 20)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2026, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2027, 6, 25)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2027, 6, 26)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2027, 11, 6)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2027, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2028, 6, 23)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2028, 6, 24)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2028, 11, 4)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2028, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2029, 6, 22)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2029, 6, 23)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2029, 11, 3)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2029, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Uudenvuodenpäivä"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Loppiainen"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Pitkäperjantai"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Pääsiäispäivä"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "2. pääsiäispäivä"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Vappu"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Helatorstai"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Helluntaipäivä"), + (NaiveDate::from_ymd_res(2030, 6, 21)?, "Juhannusaatto"), + (NaiveDate::from_ymd_res(2030, 6, 22)?, "Juhannuspäivä"), + (NaiveDate::from_ymd_res(2030, 11, 2)?, "Pyhäinpäivä"), + (NaiveDate::from_ymd_res(2030, 12, 6)?, "Itsenäisyyspäivä"), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Jouluaatto"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Joulupäivä"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Tapaninpäivä"), + ], + &mut map, + Country::FI, + "Finland", + ); + + Ok(map) +} diff --git a/src/data/fr.rs b/src/data/fr.rs new file mode 100644 index 0000000..26d5ff6 --- /dev/null +++ b/src/data/fr.rs @@ -0,0 +1,662 @@ +//! France +use super::*; + +/// Generate holiday map for France. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2000, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2000, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2000, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Ascension"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2001, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2001, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2001, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Ascension"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2002, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2002, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2002, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Ascension"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2003, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2003, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2003, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Ascension"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2004, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2004, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2004, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Ascension"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2005, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2005, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2005, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Ascension"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2006, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2006, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2006, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Ascension"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2007, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2007, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2007, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Ascension"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Jour de l'an"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Ascension; Fête du Travail", + ), + (NaiveDate::from_ymd_res(2008, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2008, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2008, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2009, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2009, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2009, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Ascension"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2010, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2010, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2010, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Ascension"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2011, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2011, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2011, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Ascension"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2012, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2012, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2012, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Ascension"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2013, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2013, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2013, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Ascension"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2014, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2014, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2014, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Ascension"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2015, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2015, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2015, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Ascension"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2016, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2016, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2016, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Ascension"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2017, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2017, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2017, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Ascension"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2018, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2018, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2018, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Ascension"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2019, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2019, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2019, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Ascension"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2020, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2020, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Ascension"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2021, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2021, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2021, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ascension"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2022, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2022, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2022, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Ascension"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2023, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2023, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2023, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Ascension"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2024, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2024, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2024, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Ascension"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2025, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2025, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2025, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Ascension"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2026, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2026, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2026, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Ascension"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2027, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2027, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2027, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Ascension"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2028, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2028, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2028, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Ascension"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2029, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2029, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2029, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Ascension"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Jour de l'an"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Fête du Travail"), + (NaiveDate::from_ymd_res(2030, 5, 8)?, "Fête de la Victoire"), + (NaiveDate::from_ymd_res(2030, 7, 14)?, "Fête nationale"), + (NaiveDate::from_ymd_res(2030, 11, 11)?, "Armistice"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Lundi de Pâques"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Lundi de Pentecôte"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Ascension"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Assomption"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Toussaint"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Noël"), + ], + &mut map, + Country::FR, + "France", + ); + + Ok(map) +} diff --git a/src/data/gb.rs b/src/data/gb.rs new file mode 100644 index 0000000..84ec560 --- /dev/null +++ b/src/data/gb.rs @@ -0,0 +1,632 @@ +//! United Kingdom +use super::*; + +/// Generate holiday map for United Kingdom. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2000, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2001, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2002, 6, 4)?, "Spring Bank Holiday"), + ( + NaiveDate::from_ymd_res(2002, 6, 3)?, + "Golden Jubilee of Elizabeth II", + ), + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2003, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2005, 5, 30)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2006, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2008, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2009, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2010, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2011, 5, 30)?, "Spring Bank Holiday"), + ( + NaiveDate::from_ymd_res(2011, 4, 29)?, + "Wedding of William and Catherine", + ), + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2012, 6, 4)?, "Spring Bank Holiday"), + ( + NaiveDate::from_ymd_res(2012, 6, 5)?, + "Diamond Jubilee of Elizabeth II", + ), + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2013, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2014, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2015, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2016, 5, 30)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2017, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2019, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "May Day"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2020, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2021, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2022, 6, 2)?, "Spring Bank Holiday"), + ( + NaiveDate::from_ymd_res(2022, 6, 3)?, + "Platinum Jubilee of Elizabeth II", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 19)?, + "State Funeral of Queen Elizabeth II", + ), + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Spring Bank Holiday"), + ( + NaiveDate::from_ymd_res(2023, 5, 8)?, + "Coronation of Charles III", + ), + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2024, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2025, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2027, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2028, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2029, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2030, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::GB, + "United Kingdom", + ); + + Ok(map) +} diff --git a/src/data/ge.rs b/src/data/ge.rs new file mode 100644 index 0000000..7507b80 --- /dev/null +++ b/src/data/ge.rs @@ -0,0 +1,1217 @@ +//! Georgia +use super::*; + +/// Generate holiday map for Georgia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2000, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2000, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2000, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2000, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2000, 4, 28)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2000, 4, 29)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2000, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2000, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2000, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2000, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2000, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2001, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2001, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2001, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2001, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2001, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2001, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2001, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2001, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2001, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2002, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2002, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2002, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2002, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2002, 5, 4)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2002, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2002, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2002, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2002, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2003, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2003, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2003, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2003, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2003, 4, 26)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2003, 4, 28)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2003, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2003, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2003, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2003, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2003, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2004, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2004, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2004, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2004, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 9)?, + "ეროვნული ერთიანობის დღე; წითელი პარასკევი", + ), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2004, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2004, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2004, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2004, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2004, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2005, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2005, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2005, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2005, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2005, 4, 29)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2005, 4, 30)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2005, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2005, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2005, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2005, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2006, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2006, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2006, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2006, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2006, 4, 22)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2006, 4, 24)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2006, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2006, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2006, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2006, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2006, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2007, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2007, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2007, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2007, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "აღდგომა"), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "ეროვნული ერთიანობის დღე; შავი ორშაბათი", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2007, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2007, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2007, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2007, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2008, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2008, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2008, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2008, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2008, 4, 26)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2008, 4, 28)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2008, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2008, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2008, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2008, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2008, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2009, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2009, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2009, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2009, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2009, 4, 17)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2009, 4, 18)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2009, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2009, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2009, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2009, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2009, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2010, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2010, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2010, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2010, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2010, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2010, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2010, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2010, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2010, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2011, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2011, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2011, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2011, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2011, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2011, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2011, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2011, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2011, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2012, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2012, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2012, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2012, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2012, 4, 13)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2012, 4, 14)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2012, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2012, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2012, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2012, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2012, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2013, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2013, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2013, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2013, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2013, 5, 3)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2013, 5, 4)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2013, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2013, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2013, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2013, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2014, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2014, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2014, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2014, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2014, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2014, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2014, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2014, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2015, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2015, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2015, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2015, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2015, 4, 10)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2015, 4, 11)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2015, 4, 13)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2015, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2015, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2015, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2015, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2015, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2016, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2016, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2016, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2016, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2016, 4, 30)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2016, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2016, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2016, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2016, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2017, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2017, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2017, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2017, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2017, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2017, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2017, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2017, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2017, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2018, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2018, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2018, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2018, 4, 7)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "აღდგომა"), + ( + NaiveDate::from_ymd_res(2018, 4, 9)?, + "ეროვნული ერთიანობის დღე; შავი ორშაბათი", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2018, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2018, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2018, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2018, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2019, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2019, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2019, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2019, 4, 27)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2019, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2019, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2019, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2019, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2020, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2020, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2020, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2020, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2020, 4, 17)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2020, 4, 18)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2020, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2020, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2020, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2020, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2020, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2021, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2021, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2021, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2021, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2021, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2021, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2021, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2021, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2022, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2022, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2022, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2022, 4, 23)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2022, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2022, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2022, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2022, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2023, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2023, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2023, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2023, 4, 15)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2023, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2023, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2023, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2023, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2023, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2024, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2024, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2024, 5, 4)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2024, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2024, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2024, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2024, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2024, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2025, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2025, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2025, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2025, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2025, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2025, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2025, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2026, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2026, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2026, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2026, 4, 10)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2026, 4, 11)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2026, 4, 13)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2026, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2026, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2026, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2026, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2026, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2027, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2027, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2027, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2027, 4, 30)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2027, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2027, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2027, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2027, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2027, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2028, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2028, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2028, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2028, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2028, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2028, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2028, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2028, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2029, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2029, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2029, 4, 7)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "აღდგომა"), + ( + NaiveDate::from_ymd_res(2029, 4, 9)?, + "ეროვნული ერთიანობის დღე; შავი ორშაბათი", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2029, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2029, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2029, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2029, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "ახალი წელი"), + (NaiveDate::from_ymd_res(2030, 1, 7)?, "ქრისტეშობა"), + (NaiveDate::from_ymd_res(2030, 1, 19)?, "ნათლისღება"), + (NaiveDate::from_ymd_res(2030, 3, 3)?, "დედის დღე"), + ( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "ქალთა საერთაშორისო დღე", + ), + (NaiveDate::from_ymd_res(2030, 4, 26)?, "წითელი პარასკევი"), + (NaiveDate::from_ymd_res(2030, 4, 27)?, "დიდი შაბათი"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "აღდგომა"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "შავი ორშაბათი"), + ( + NaiveDate::from_ymd_res(2030, 4, 9)?, + "ეროვნული ერთიანობის დღე", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 9)?, + "ფაშიზმზე გამარჯვების დღე", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 12)?, + "წმინდა ანდრია პირველწოდებულის დღე", + ), + (NaiveDate::from_ymd_res(2030, 5, 26)?, "დამოუკიდებლობის დღე"), + (NaiveDate::from_ymd_res(2030, 8, 28)?, "მარიამობა"), + (NaiveDate::from_ymd_res(2030, 10, 14)?, "მცხეთობის"), + (NaiveDate::from_ymd_res(2030, 11, 23)?, "გიორგობა"), + ], + &mut map, + Country::GE, + "Georgia", + ); + + Ok(map) +} diff --git a/src/data/gr.rs b/src/data/gr.rs new file mode 100644 index 0000000..100dbc5 --- /dev/null +++ b/src/data/gr.rs @@ -0,0 +1,1080 @@ +//! Greece +use super::*; + +/// Generate holiday map for Greece. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2000, 3, 13)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2000, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2000, 4, 28)?, "Μεγάλη Παρασκευή"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Δευτέρα του Πάσχα; Εργατική Πρωτομαγιά", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 19)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2000, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2001, 2, 26)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2001, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2001, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2002, 3, 18)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2002, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2002, 6, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2002, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2003, 3, 10)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2003, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2003, 4, 28)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2003, 6, 16)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2003, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2004, 2, 23)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2004, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2004, 5, 31)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2004, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2005, 3, 14)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2005, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2005, 4, 29)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2005, 6, 20)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2005, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2006, 3, 6)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2006, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2006, 4, 24)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2006, 6, 12)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2006, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2007, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2007, 5, 28)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2007, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2008, 3, 10)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2008, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2008, 4, 28)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2008, 6, 16)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2008, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2009, 3, 2)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2009, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2009, 4, 17)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2009, 6, 8)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2009, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2010, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2010, 5, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2010, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2011, 3, 7)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2011, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2011, 6, 13)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2011, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2012, 2, 27)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2012, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2012, 4, 13)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2012, 6, 4)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2012, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2013, 3, 18)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2013, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2013, 5, 3)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2013, 6, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2013, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2014, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2014, 6, 9)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2014, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2015, 2, 23)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2015, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2015, 4, 10)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2015, 4, 13)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2015, 6, 1)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2015, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2016, 3, 14)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2016, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2016, 6, 20)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2016, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2017, 2, 27)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2017, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2017, 6, 5)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2017, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2018, 2, 19)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2018, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2018, 4, 9)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2018, 5, 28)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2018, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2019, 3, 11)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2019, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2019, 6, 17)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2019, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2020, 3, 2)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2020, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2020, 4, 17)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2020, 6, 8)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2020, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2021, 3, 15)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2021, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2021, 6, 21)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2021, 5, 4)?, + "Εργατική Πρωτομαγιά (παρατηρήθηκε)", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2021, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2022, 3, 7)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2022, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2022, 6, 13)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Εργατική Πρωτομαγιά (παρατηρήθηκε)", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2022, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2023, 2, 27)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2023, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2023, 6, 5)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2023, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2024, 3, 18)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2024, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2024, 6, 24)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2024, 5, 7)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2024, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2025, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2025, 6, 9)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2025, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2026, 2, 23)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2026, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2026, 4, 10)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2026, 4, 13)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2026, 6, 1)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2026, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2027, 3, 15)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2027, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2027, 4, 30)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2027, 6, 21)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2027, 5, 4)?, + "Εργατική Πρωτομαγιά (παρατηρήθηκε)", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2027, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2028, 2, 28)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2028, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2028, 6, 5)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2028, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2029, 2, 19)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2029, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2029, 4, 9)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2029, 5, 28)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2029, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Πρωτοχρονιά"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Θεοφάνεια"), + (NaiveDate::from_ymd_res(2030, 3, 11)?, "Καθαρά Δευτέρα"), + ( + NaiveDate::from_ymd_res(2030, 3, 25)?, + "Εικοστή Πέμπτη Μαρτίου", + ), + (NaiveDate::from_ymd_res(2030, 4, 26)?, "Μεγάλη Παρασκευή"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "Δευτέρα του Πάσχα"), + ( + NaiveDate::from_ymd_res(2030, 6, 17)?, + "Δευτέρα του Αγίου Πνεύματος", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Εργατική Πρωτομαγιά"), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Κοίμηση της Θεοτόκου", + ), + (NaiveDate::from_ymd_res(2030, 10, 28)?, "Ημέρα του Όχι"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Χριστούγεννα"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Σύναξη της Υπεραγίας Θεοτόκου", + ), + ], + &mut map, + Country::GR, + "Greece", + ); + + Ok(map) +} diff --git a/src/data/helper.rs b/src/data/helper.rs new file mode 100644 index 0000000..1a706a4 --- /dev/null +++ b/src/data/helper.rs @@ -0,0 +1,32 @@ +use chrono::NaiveDate; + +use crate::{prelude::*, Holiday, HolidayPerCountryMap, Year}; + +pub fn should_build_year(years: &Option<&std::ops::Range>, year: Year) -> bool { + years.map_or(true, |r| r.contains(&year)) +} + +pub fn build_year( + years: &Option<&std::ops::Range>, + year: Year, + holidays: impl IntoIterator, + map: &mut HolidayPerCountryMap, + country: Country, + county_name: impl ToString, +) { + if !should_build_year(years, year) { + return; + } + + let m = holidays + .into_iter() + .map(|h| { + ( + h.0, + Holiday::new(country, county_name.to_string(), h.0, h.1), + ) + }) + .collect(); + + map.insert(year, m); +} diff --git a/src/data/hk.rs b/src/data/hk.rs new file mode 100644 index 0000000..532b67e --- /dev/null +++ b/src/data/hk.rs @@ -0,0 +1,1523 @@ +//! Hong Kong +use super::*; + +/// Generate holiday map for Hong Kong. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 4)?, + "The day preceding Lunar New Year's Day", + ), + (NaiveDate::from_ymd_res(2000, 2, 5)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 2, 7)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2000, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 6, 6)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2000, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 13)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 6)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2000, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2000, 10, 2)?, + "National Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 24)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 25)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 26)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2001, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 6, 25)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2001, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 2)?, + "Hong Kong Special Administrative Region Establishment Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 2)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 25)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2001, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 12)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 13)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 14)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2002, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 6, 15)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2002, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 21)?, + "Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 14)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2002, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 31)?, + "The day preceding Lunar New Year's Day", + ), + (NaiveDate::from_ymd_res(2003, 2, 1)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2003, 2, 3)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2003, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 6, 4)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2003, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 12)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 4)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2003, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 22)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 23)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 24)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2004, 4, 4)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2004, 4, 5)?, + "Ching Ming Festival (observed)", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 6, 22)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2004, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 29)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 22)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2004, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 1)?, + "The first day of January", + ), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2005, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 6, 11)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2005, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 19)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 11)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2005, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "The first day of January (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 28)?, + "The day preceding Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 30)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 31)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2006, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 5, 31)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2006, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 7)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 30)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2006, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 2)?, + "National Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 17)?, + "The day preceding Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 20)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 6, 19)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2007, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 2)?, + "Hong Kong Special Administrative Region Establishment Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 26)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 19)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2007, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 1)?, + "The first day of January", + ), + (NaiveDate::from_ymd_res(2008, 2, 7)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2008, 2, 8)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 9)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2008, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 6, 8)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2008, 6, 9)?, + "Tuen Ng Festival (observed)", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 15)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 7)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 26)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 27)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 28)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2009, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 5, 28)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2009, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 3)?, + "Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 26)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2009, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 13)?, + "The day preceding Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 16)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 6, 16)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2010, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 23)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 16)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2010, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 1)?, + "The first day of January", + ), + (NaiveDate::from_ymd_res(2011, 2, 3)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 2, 4)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 5)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2011, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 6, 6)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2011, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 13)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 5)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2011, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "The first day of January (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 23)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 24)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 25)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2012, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2012, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 2)?, + "Hong Kong Special Administrative Region Establishment Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 1)?, + "National Day; The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 23)?, + "Chung Yeung Festival", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 2)?, + "National Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 13)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 11)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 12)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2013, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 6, 12)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2013, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 20)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 13)?, + "Chung Yeung Festival", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 14)?, + "Chung Yeung Festival (observed)", + ), + (NaiveDate::from_ymd_res(2013, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 3)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 31)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 1)?, + "The second day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2014, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 6, 2)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2014, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 9)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 2)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2014, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2015, + vec![ + + (NaiveDate::from_ymd_res(2015, 1, 1)?, "The first day of January"), + (NaiveDate::from_ymd_res(2015, 2, 19)?, "Lunar New Year's Day"), + (NaiveDate::from_ymd_res(2015, 2, 20)?, "The second day of Lunar New Year"), + (NaiveDate::from_ymd_res(2015, 2, 21)?, "The third day of Lunar New Year"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Ching Ming Festival (observed)"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 6, 20)?, "Tuen Ng Festival"), + (NaiveDate::from_ymd_res(2015, 7, 1)?, "Hong Kong Special Administrative Region Establishment Day"), + (NaiveDate::from_ymd_res(2015, 9, 28)?, "The day following the Chinese Mid-Autumn Festival"), + (NaiveDate::from_ymd_res(2015, 10, 21)?, "Chung Yeung Festival"), + (NaiveDate::from_ymd_res(2015, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 9, 3)?, "The 70th anniversary day of the victory of the Chinese people's war of resistance against Japanese aggression"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 1)?, + "The first day of January", + ), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2016, 2, 9)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 10)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2016, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 6, 9)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2016, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 16)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 9)?, + "Chung Yeung Festival", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Chung Yeung Festival (observed)", + ), + (NaiveDate::from_ymd_res(2016, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "The first day of January (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 31)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 28)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 30)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2017, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 5, 30)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2017, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 5)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 28)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2017, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 2)?, + "National Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 19)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 16)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 17)?, + "The second day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2018, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 6, 18)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2018, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 2)?, + "Hong Kong Special Administrative Region Establishment Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 25)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 17)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2018, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 1)?, + "The first day of January", + ), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2019, 2, 6)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 7)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2019, 4, 5)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 6, 7)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2019, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 14)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 7)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2019, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 28)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 25)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 27)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2020, 4, 4)?, "Ching Ming Festival"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 6, 25)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2020, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 2)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 25)?, + "Chung Yeung Festival", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 26)?, + "Chung Yeung Festival (observed)", + ), + (NaiveDate::from_ymd_res(2020, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 12)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 13)?, + "The second day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2021, 4, 5)?, + "Ching Ming Festival (observed)", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 6, 14)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2021, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 22)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 14)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2021, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 1)?, + "The first day of January", + ), + (NaiveDate::from_ymd_res(2022, 2, 1)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 2, 2)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 3)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2022, 4, 5)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2022, 5, 8)?, + "The Birthday of the Buddha", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 9)?, + "The Birthday of the Buddha (observed)", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 6, 3)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2022, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 12)?, + "The second day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 4)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2022, 10, 1)?, "National Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "The first day of January (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 25)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 23)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 24)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2023, 4, 5)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2023, 5, 26)?, + "The Birthday of the Buddha", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 6, 22)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2023, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 30)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 23)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2023, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 2)?, + "National Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 13)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 10)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 12)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2024, 4, 4)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2024, 5, 15)?, + "The Birthday of the Buddha", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 6, 10)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2024, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 18)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 11)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2024, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "The first weekday after Christmas Day", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 29)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 30)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 31)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2025, 4, 4)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2025, 5, 4)?, + "The Birthday of the Buddha", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 5)?, + "The Birthday of the Buddha (observed)", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 5, 31)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2025, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 7)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 29)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2025, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "The first weekday after Christmas Day", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 17)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 18)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 19)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2026, 4, 7)?, + "Ching Ming Festival (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 24)?, + "The Birthday of the Buddha", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 25)?, + "The Birthday of the Buddha (observed)", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 6, 19)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2026, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 26)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 18)?, + "Chung Yeung Festival", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 19)?, + "Chung Yeung Festival (observed)", + ), + (NaiveDate::from_ymd_res(2026, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "The first weekday after Christmas Day", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 9)?, + "The fourth day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2027, 2, 6)?, "Lunar New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 4, 5)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2027, 5, 13)?, + "The Birthday of the Buddha", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 6, 9)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2027, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 16)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 8)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2027, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "The first weekday after Christmas Day", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "The first weekday after Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 26)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 27)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 28)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 4, 4)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2028, 5, 2)?, + "The Birthday of the Buddha", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2028, 5, 29)?, + "Tuen Ng Festival (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 4)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 26)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2028, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 2)?, + "National Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "The first weekday after Christmas Day", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 13)?, + "Lunar New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 4, 4)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2029, 5, 20)?, + "The Birthday of the Buddha", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 21)?, + "The Birthday of the Buddha (observed)", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 6, 16)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2029, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 2)?, + "Hong Kong Special Administrative Region Establishment Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 24)?, + "The second day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 16)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2029, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "The first weekday after Christmas Day", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 1)?, + "The first day of January", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "The fourth day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "The second day of Lunar New Year", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "The third day of Lunar New Year", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2030, 4, 20)?, + "The day following Good Friday", + ), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 4, 5)?, "Ching Ming Festival"), + ( + NaiveDate::from_ymd_res(2030, 5, 9)?, + "The Birthday of the Buddha", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 6, 5)?, "Tuen Ng Festival"), + ( + NaiveDate::from_ymd_res(2030, 7, 1)?, + "Hong Kong Special Administrative Region Establishment Day", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 13)?, + "The day following the Chinese Mid-Autumn Festival", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 5)?, + "Chung Yeung Festival", + ), + (NaiveDate::from_ymd_res(2030, 10, 1)?, "National Day"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "The first weekday after Christmas Day", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::HK, + "Hong Kong", + ); + + Ok(map) +} diff --git a/src/data/hn.rs b/src/data/hn.rs new file mode 100644 index 0000000..3b3f6e2 --- /dev/null +++ b/src/data/hn.rs @@ -0,0 +1,811 @@ +//! Honduras +use super::*; + +/// Generate holiday map for Honduras. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2000, 4, 22)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2000, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2000, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2000, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2000, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2000, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2001, 4, 14)?, + "Día de las Américas; Sábado de Gloria", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2001, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2001, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2001, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2001, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2002, 3, 30)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2002, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2002, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2002, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2002, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2002, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2003, 4, 19)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2003, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2003, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2003, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2003, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2003, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2004, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2004, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2004, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2004, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2004, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2005, 3, 26)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2005, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2005, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2005, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2005, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Jueves Santo"), + ( + NaiveDate::from_ymd_res(2006, 4, 14)?, + "Día de las Américas; Viernes Santo", + ), + (NaiveDate::from_ymd_res(2006, 4, 15)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2006, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2006, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2006, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2006, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2007, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2007, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2007, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2007, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2007, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2008, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2008, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2008, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2008, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2008, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2009, 4, 11)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2009, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2009, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2009, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2009, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2010, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2010, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2010, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2010, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2010, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2011, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2011, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2011, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2011, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2011, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2012, 4, 7)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2012, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2012, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2012, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2012, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2013, 3, 30)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2013, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2013, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2013, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2013, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2013, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2014, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "Día de Morazán"), + (NaiveDate::from_ymd_res(2014, 10, 12)?, "Día de la Raza"), + ( + NaiveDate::from_ymd_res(2014, 10, 21)?, + "Día de las Fuerzas Armadas", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2015, 4, 4)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2015, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2015, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2015, 10, 7)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2015, 10, 8)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2015, 10, 9)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2016, 3, 26)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2016, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2016, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2016, 10, 5)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2016, 10, 6)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2016, 10, 7)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Jueves Santo"), + ( + NaiveDate::from_ymd_res(2017, 4, 14)?, + "Día de las Américas; Viernes Santo", + ), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2017, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2017, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2017, 10, 5)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2017, 10, 6)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2018, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2018, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2018, 10, 3)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2018, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2018, 10, 5)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2019, 4, 20)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2019, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2019, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2019, 10, 2)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2019, 10, 3)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2019, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2020, 4, 11)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2020, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2020, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2020, 10, 7)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2020, 10, 8)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2020, 10, 9)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2021, 4, 3)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2021, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2021, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2021, 10, 6)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2021, 10, 7)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2021, 10, 8)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2022, 4, 14)?, + "Día de las Américas; Jueves Santo", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2022, 4, 16)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2022, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2022, 10, 5)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2022, 10, 6)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2022, 10, 7)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2023, 4, 8)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2023, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2023, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2023, 10, 5)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2023, 10, 6)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2024, 3, 30)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2024, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2024, 10, 2)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2024, 10, 3)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2024, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2025, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2025, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2025, 10, 1)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2025, 10, 2)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2025, 10, 3)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2026, 4, 4)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2026, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2026, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2026, 10, 7)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2026, 10, 8)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2026, 10, 9)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2027, 3, 27)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2027, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2027, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2027, 10, 6)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2027, 10, 7)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2027, 10, 8)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Jueves Santo"), + ( + NaiveDate::from_ymd_res(2028, 4, 14)?, + "Día de las Américas; Viernes Santo", + ), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2028, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2028, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2028, 10, 5)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2028, 10, 6)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2029, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2029, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2029, 10, 3)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2029, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2029, 10, 5)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2030, 4, 20)?, "Sábado de Gloria"), + (NaiveDate::from_ymd_res(2030, 4, 14)?, "Día de las Américas"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2030, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2030, 10, 2)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2030, 10, 3)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2030, 10, 4)?, "Semana Morazánica"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ], + &mut map, + Country::HN, + "Honduras", + ); + + Ok(map) +} diff --git a/src/data/hr.rs b/src/data/hr.rs new file mode 100644 index 0000000..d5c1f65 --- /dev/null +++ b/src/data/hr.rs @@ -0,0 +1,929 @@ +//! Croatia +use super::*; + +/// Generate holiday map for Croatia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2000, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2000, 5, 30)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2000, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2001, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2001, 5, 30)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2001, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2002, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2002, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2002, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2003, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2003, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2003, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2003, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2004, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2004, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2004, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2004, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2005, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2005, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2005, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2005, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2006, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2006, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2006, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2006, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2007, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2007, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2007, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti", + ), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2008, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2008, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2008, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2008, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2009, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Uskrs"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2009, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2009, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2009, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2010, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Uskrs"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2010, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2010, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2010, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2011, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Uskrs"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2011, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2011, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2011, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2012, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Uskrs"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2012, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2012, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2013, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Uskrs"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2013, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2013, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2013, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Uskrs"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2014, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2014, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2014, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2015, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Uskrs"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2015, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2015, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2015, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2016, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Uskrs"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2016, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2016, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2016, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2017, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Uskrs"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2017, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2017, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2018, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Uskrs"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2018, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2018, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nova godina"), + ( + NaiveDate::from_ymd_res(2019, 1, 6)?, + "Bogojavljenje ili Sveta tri kralja", + ), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Uskrs"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2019, 6, 25)?, "Dan državnosti"), + ( + NaiveDate::from_ymd_res(2019, 6, 22)?, + "Dan antifašističke borbe", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 5)?, + "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", + ), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2019, 10, 8)?, "Dan neovisnosti"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2020, + vec![ + + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Uskrs"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2020, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2020, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2020, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2020, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2021, + vec![ + + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Uskrs"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2021, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2021, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2021, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2021, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2022, + vec![ + + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Uskrs"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2022, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2022, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2022, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2022, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2023, + vec![ + + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Uskrs"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2023, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2023, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2023, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2023, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2024, + vec![ + + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Uskrs"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Dan državnosti; Tijelovo"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2024, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2024, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2024, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2025, + vec![ + + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Uskrs"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2025, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2025, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2025, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2025, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2026, + vec![ + + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Uskrs"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2026, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2026, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2026, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2026, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2027, + vec![ + + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Uskrs"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2027, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2027, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2027, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2027, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2028, + vec![ + + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Uskrs"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2028, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2028, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2028, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2028, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2029, + vec![ + + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Uskrs"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2029, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2029, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2029, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2029, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + build_year( + years, + 2030, + vec![ + + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nova godina"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Bogojavljenje ili Sveta tri kralja"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Uskrs"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Uskrsni ponedjeljak"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Tijelovo"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Praznik rada"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Dan državnosti"), + (NaiveDate::from_ymd_res(2030, 6, 22)?, "Dan antifašističke borbe"), + (NaiveDate::from_ymd_res(2030, 8, 5)?, "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Velika Gospa"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Svi sveti"), + (NaiveDate::from_ymd_res(2030, 11, 18)?, "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Božić"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Sveti Stjepan"), + ], + &mut map, + Country::HR, + "Croatia", + ); + + Ok(map) +} diff --git a/src/data/hu.rs b/src/data/hu.rs new file mode 100644 index 0000000..c998f0d --- /dev/null +++ b/src/data/hu.rs @@ -0,0 +1,949 @@ +//! Hungary +use super::*; + +/// Generate holiday map for Hungary. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2000, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Húsvét"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2000, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2000, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2001, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Húsvét"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2001, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2001, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2002, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Húsvét"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2002, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2002, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2003, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Húsvét"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2003, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2003, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2004, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Húsvét"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2004, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2004, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2005, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Húsvét"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2005, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2005, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2006, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Húsvét"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2006, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2007, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Húsvét"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2007, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2007, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2008, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Húsvét"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2008, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2008, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2009, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Húsvét"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2009, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2009, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2010, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Húsvét"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2010, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2010, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2010, 12, 24)?, + "Pihenőnap (2010. 12. 11.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2011, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Húsvét"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2011, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2011, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2011, 3, 14)?, + "Pihenőnap (2011. 03. 19.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 31)?, + "Pihenőnap (2011. 11. 05.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2012, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Húsvét"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2012, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2012, 3, 16)?, + "Pihenőnap (2012. 03. 24.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 30)?, + "Pihenőnap (2012. 04. 21.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 22)?, + "Pihenőnap (2012. 10. 27.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 2)?, + "Pihenőnap (2012. 11. 10.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 24)?, + "Pihenőnap (2012. 12. 15.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 31)?, + "Pihenőnap (2012. 12. 01.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2013, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Húsvét"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2013, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2013, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2013, 8, 19)?, + "Pihenőnap (2013. 08. 24.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 24)?, + "Pihenőnap (2013. 12. 07.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 27)?, + "Pihenőnap (2013. 12. 21.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2014, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Húsvét"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2014, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2014, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2014, 5, 2)?, + "Pihenőnap (2014. 05. 10.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 24)?, + "Pihenőnap (2014. 10. 18.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 24)?, + "Pihenőnap (2014. 12. 13.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2015, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Húsvét"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2015, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2015, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2015, 1, 2)?, + "Pihenőnap (2015. 01. 10.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 21)?, + "Pihenőnap (2015. 08. 08.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 24)?, + "Pihenőnap (2015. 12. 12.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2016, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Húsvét"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2016, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2016, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2016, 3, 14)?, + "Pihenőnap (2016. 03. 05.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 31)?, + "Pihenőnap (2016. 10. 15.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2017, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Húsvét"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2017, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2017, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2018, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Húsvét"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2018, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2018, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2018, 3, 16)?, + "Pihenőnap (2018. 03. 10.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "Pihenőnap (2018. 04. 21.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 22)?, + "Pihenőnap (2018. 10. 13.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 2)?, + "Pihenőnap (2018. 11. 10.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 24)?, + "Pihenőnap (2018. 12. 01.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Pihenőnap (2018. 12. 15.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2019, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Húsvét"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2019, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2019, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2019, 8, 19)?, + "Pihenőnap (2019. 08. 10.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 24)?, + "Pihenőnap (2019. 12. 07.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 27)?, + "Pihenőnap (2019. 12. 14.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2020, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Húsvét"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2020, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2020, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2020, 8, 21)?, + "Pihenőnap (2020. 08. 29.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 24)?, + "Pihenőnap (2020. 12. 12.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2021, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Húsvét"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2021, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2021, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2021, 12, 24)?, + "Pihenőnap (2021. 12. 11.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2022, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Húsvét"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2022, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2022, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2022, 3, 14)?, + "Pihenőnap (2022. 03. 26.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 31)?, + "Pihenőnap (2022. 10. 15.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2023, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Húsvét"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2023, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2023, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2024, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Húsvét"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2024, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2024, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Karácsony másnapja"), + ( + NaiveDate::from_ymd_res(2024, 8, 19)?, + "Pihenőnap (2024. 08. 03.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 24)?, + "Pihenőnap (2024. 12. 07.-től helyettesítve)", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 27)?, + "Pihenőnap (2024. 12. 14.-től helyettesítve)", + ), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2025, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Húsvét"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2025, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2025, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2026, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Húsvét"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2026, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2026, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2027, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Húsvét"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2027, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2027, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2028, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Húsvét"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2028, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2028, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2029, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Húsvét"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2029, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2029, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Újév"), + (NaiveDate::from_ymd_res(2030, 3, 15)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Nagypéntek"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Húsvét"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Húsvét Hétfő"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pünkösd"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Pünkösdhétfő"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "A Munka ünnepe"), + ( + NaiveDate::from_ymd_res(2030, 8, 20)?, + "Az államalapítás ünnepe", + ), + (NaiveDate::from_ymd_res(2030, 10, 23)?, "Nemzeti ünnep"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Mindenszentek"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Karácsony"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Karácsony másnapja"), + ], + &mut map, + Country::HU, + "Hungary", + ); + + Ok(map) +} diff --git a/src/data/id.rs b/src/data/id.rs new file mode 100644 index 0000000..748b340 --- /dev/null +++ b/src/data/id.rs @@ -0,0 +1,1441 @@ +//! Indonesia +use super::*; + +/// Generate holiday map for Indonesia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2000, 5, 18)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 1)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "Tahun Baru Islam (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 24)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2001, 5, 7)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 24)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Hari Raya Idulfitri", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2001, 3, 6)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2001, 3, 26)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 15)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2002, 5, 26)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2002, 12, 6)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2002, 12, 7)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2002, 2, 23)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2002, 3, 15)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 4)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2003, 2, 1)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2003, 5, 15)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 29)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Hari Raya Idulfitri", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2003, 3, 5)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 24)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2004, 1, 22)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2004, 6, 2)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 20)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Hari Raya Idulfitri", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2004, 2, 2)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2004, 2, 22)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 12)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2005, 5, 22)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 5)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2005, 2, 10)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 1)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2006, 1, 30)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2006, 5, 12)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "Hari Raya Idulfitri", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 25)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2006, 1, 31)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2006, 4, 10)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 22)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2007, 6, 1)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2007, 5, 17)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2007, 10, 13)?, + "Hari Raya Idulfitri", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2007, 1, 20)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 11)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2008, 2, 7)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2008, 5, 20)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2008, 1, 10)?, "Tahun Baru Islam"), + (NaiveDate::from_ymd_res(2008, 12, 29)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 31)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2009, 3, 26)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2009, 5, 9)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2009, 5, 21)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2009, 12, 18)?, "Tahun Baru Islam"), + (NaiveDate::from_ymd_res(2009, 3, 9)?, "Maulid Nabi Muhammad"), + ( + NaiveDate::from_ymd_res(2009, 7, 20)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2010, 3, 16)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2010, 5, 28)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2010, 5, 13)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2010, 12, 7)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 9)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2011, 2, 3)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2011, 3, 5)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2011, 5, 17)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2011, 6, 2)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2011, 11, 27)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 29)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2012, 1, 23)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2012, 3, 23)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2012, 5, 6)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2012, 5, 17)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2012, 11, 15)?, "Tahun Baru Islam"), + (NaiveDate::from_ymd_res(2012, 2, 5)?, "Maulid Nabi Muhammad"), + ( + NaiveDate::from_ymd_res(2012, 6, 17)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2013, 3, 12)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2013, 5, 25)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2013, 11, 5)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 6)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2014, 1, 31)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2014, 3, 31)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2014, 5, 15)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 29)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2014, 10, 5)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2014, 10, 25)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2014, 1, 14)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 27)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2015, 2, 19)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2015, 3, 21)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2015, 6, 2)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 14)?, + "Kenaikan Yesus Kristus", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2015, 10, 14)?, "Tahun Baru Islam"), + (NaiveDate::from_ymd_res(2015, 1, 3)?, "Maulid Nabi Muhammad"), + ( + NaiveDate::from_ymd_res(2015, 12, 24)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 16)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2016, 3, 9)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2016, 5, 22)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 5)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2016, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2016, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2016, 10, 2)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2016, 12, 12)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 6)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2017, 1, 28)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2017, 3, 28)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2017, 5, 11)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2017, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2017, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2017, 9, 21)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2017, 12, 1)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2018, 2, 16)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2018, 3, 17)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2018, 5, 29)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 10)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2018, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2018, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2018, 9, 11)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2018, 11, 20)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 14)?, + "Isra Mikraj Nabi Muhammad", + ), + (NaiveDate::from_ymd_res(2018, 6, 27)?, "Hari Pemilihan"), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2019, 3, 7)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2019, 5, 19)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 30)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2019, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2019, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2019, 6, 6)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2019, 9, 1)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 3)?, + "Isra Mikraj Nabi Muhammad", + ), + (NaiveDate::from_ymd_res(2019, 4, 17)?, "Hari Pemilihan"), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2020, 3, 25)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2020, 5, 7)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 21)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2020, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2020, 8, 20)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2020, 10, 29)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 22)?, + "Isra Mikraj Nabi Muhammad", + ), + (NaiveDate::from_ymd_res(2020, 12, 9)?, "Hari Pemilihan"), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2021, 3, 14)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2021, 5, 26)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Hari Raya Idulfitri; Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2021, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2021, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2021, 8, 11)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2021, 10, 19)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 11)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2022, 2, 1)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2022, 3, 3)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2022, 5, 16)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 26)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2022, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2022, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2022, 7, 30)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2022, 10, 8)?, + "Maulid Nabi Muhammad", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 28)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Tahun Baru Masehi"), + (NaiveDate::from_ymd_res(2023, 1, 22)?, "Tahun Baru Imlek"), + (NaiveDate::from_ymd_res(2023, 3, 22)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Wafat Yesus Kristus"), + (NaiveDate::from_ymd_res(2023, 6, 4)?, "Hari Raya Waisak"), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 18)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2023, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2023, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2023, 4, 23)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "Hari Raya Iduladha"), + (NaiveDate::from_ymd_res(2023, 7, 19)?, "Tahun Baru Islam"), + ( + NaiveDate::from_ymd_res(2023, 9, 27)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 18)?, + "Isra Mikraj Nabi Muhammad", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Tahun Baru Masehi"), + ( + NaiveDate::from_ymd_res(2024, 2, 10)?, + "Tahun Baru Imlek (perkiraan)", + ), + (NaiveDate::from_ymd_res(2024, 3, 11)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2024, 5, 22)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2024, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2024, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Hari Raya Natal"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Hari Raya Idulfitri"), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "Hari kedua dari Hari Raya Idulfitri", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 7)?, + "Tahun Baru Islam (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 8)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Tahun Baru Masehi"), + ( + NaiveDate::from_ymd_res(2025, 1, 29)?, + "Tahun Baru Imlek (perkiraan)", + ), + (NaiveDate::from_ymd_res(2025, 3, 29)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2025, 5, 11)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 29)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2025, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2025, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "Tahun Baru Islam (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 27)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Tahun Baru Masehi"), + ( + NaiveDate::from_ymd_res(2026, 2, 17)?, + "Tahun Baru Imlek (perkiraan)", + ), + (NaiveDate::from_ymd_res(2026, 3, 19)?, "Hari Suci Nyepi"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2026, 5, 31)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 14)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2026, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2026, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 16)?, + "Tahun Baru Islam (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2026, 1, 16)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Tahun Baru Masehi"), + ( + NaiveDate::from_ymd_res(2027, 2, 6)?, + "Tahun Baru Imlek (perkiraan)", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2027, 5, 20)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 6)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2027, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2027, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Hari Raya Natal; Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "Tahun Baru Islam (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 5)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Tahun Baru Masehi"), + ( + NaiveDate::from_ymd_res(2028, 1, 26)?, + "Tahun Baru Imlek (perkiraan)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Kenaikan Yesus Kristus; Tahun Baru Islam (perkiraan)", + ), + (NaiveDate::from_ymd_res(2028, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2028, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 14)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Tahun Baru Masehi"), + ( + NaiveDate::from_ymd_res(2029, 2, 13)?, + "Tahun Baru Imlek (perkiraan)", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2029, 5, 27)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 10)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2029, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2029, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "Tahun Baru Islam (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 3)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Tahun Baru Masehi"), + ( + NaiveDate::from_ymd_res(2030, 2, 3)?, + "Tahun Baru Imlek (perkiraan)", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Wafat Yesus Kristus"), + ( + NaiveDate::from_ymd_res(2030, 5, 16)?, + "Hari Raya Waisak (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Hari Buruh Internasional", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 30)?, + "Kenaikan Yesus Kristus", + ), + (NaiveDate::from_ymd_res(2030, 6, 1)?, "Hari Lahir Pancasila"), + ( + NaiveDate::from_ymd_res(2030, 8, 17)?, + "Hari Kemerdekaan Republik Indonesia", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Hari Raya Natal"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Hari kedua dari Hari Raya Idulfitri (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Hari Raya Iduladha (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "Tahun Baru Islam (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "Maulid Nabi Muhammad (perkiraan)", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 23)?, + "Isra Mikraj Nabi Muhammad (perkiraan)", + ), + ], + &mut map, + Country::ID, + "Indonesia", + ); + + Ok(map) +} diff --git a/src/data/ie.rs b/src/data/ie.rs new file mode 100644 index 0000000..0f2b877 --- /dev/null +++ b/src/data/ie.rs @@ -0,0 +1,710 @@ +//! Ireland +use super::*; + +/// Generate holiday map for Ireland. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2000, 6, 5)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2000, 8, 7)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2000, 10, 30)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2001, 8, 6)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2001, 10, 29)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2002, 6, 3)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2002, 8, 5)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2002, 10, 28)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2003, 6, 2)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2003, 8, 4)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2003, 10, 27)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2004, 6, 7)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2004, 8, 2)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2004, 10, 25)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2005, 6, 6)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2005, 8, 1)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2005, 10, 31)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2006, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2006, 8, 7)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2006, 10, 30)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2007, 6, 4)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2007, 8, 6)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2007, 10, 29)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2008, 6, 2)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2008, 8, 4)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2008, 10, 27)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2009, 8, 3)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2009, 10, 26)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2010, 6, 7)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2010, 8, 2)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2010, 10, 25)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2011, 6, 6)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2011, 8, 1)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2011, 10, 31)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "St. Stephen's Day"), + ( + NaiveDate::from_ymd_res(2011, 9, 14)?, + "National Day of Mourning", + ), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2012, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2012, 6, 4)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2012, 8, 6)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2012, 10, 29)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2013, 6, 3)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2013, 8, 5)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2013, 10, 28)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2014, 6, 2)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2014, 8, 4)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2014, 10, 27)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2015, 6, 1)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2015, 8, 3)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2015, 10, 26)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2016, 6, 6)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2016, 8, 1)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2016, 10, 31)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2017, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2017, 8, 7)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2017, 10, 30)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2018, 6, 4)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2018, 8, 6)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2018, 10, 29)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2019, 6, 3)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2019, 8, 5)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2019, 10, 28)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2020, 8, 3)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2020, 10, 26)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2021, 6, 7)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2021, 8, 2)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2021, 10, 25)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2022, 8, 1)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2022, 10, 31)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "St. Stephen's Day"), + ( + NaiveDate::from_ymd_res(2022, 3, 18)?, + "Day of Remembrance and Recognition", + ), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2023, 2, 6)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2023, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2023, 6, 5)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2023, 8, 7)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2023, 10, 30)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 2, 5)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2024, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2024, 6, 3)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2024, 8, 5)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2024, 10, 28)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 2, 3)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2025, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2025, 6, 2)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2025, 8, 4)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2025, 10, 27)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 2, 2)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2026, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2026, 6, 1)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2026, 8, 3)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2026, 10, 26)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 2, 1)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2027, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2027, 6, 7)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2027, 8, 2)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2027, 10, 25)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 2, 7)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2028, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2028, 8, 7)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2028, 10, 30)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 2, 5)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2029, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2029, 6, 4)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2029, 8, 6)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2029, 10, 29)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 2, 1)?, "St. Brigid's Day"), + (NaiveDate::from_ymd_res(2030, 3, 17)?, "St. Patrick's Day"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2030, 6, 3)?, "June Bank Holiday"), + (NaiveDate::from_ymd_res(2030, 8, 5)?, "August Bank Holiday"), + ( + NaiveDate::from_ymd_res(2030, 10, 28)?, + "October Bank Holiday", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "St. Stephen's Day"), + ], + &mut map, + Country::IE, + "Ireland", + ); + + Ok(map) +} diff --git a/src/data/il.rs b/src/data/il.rs new file mode 100644 index 0000000..4237432 --- /dev/null +++ b/src/data/il.rs @@ -0,0 +1,694 @@ +//! Israel +use super::*; + +/// Generate holiday map for Israel. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 9, 30)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2000, 10, 1)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2000, 10, 14)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2000, 10, 21)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "פסח"), + (NaiveDate::from_ymd_res(2000, 4, 26)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2000, 5, 10)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2000, 6, 9)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 9, 18)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2001, 9, 19)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2001, 9, 27)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2001, 10, 2)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2001, 10, 9)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2001, 4, 8)?, "פסח"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2001, 4, 26)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2001, 5, 28)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 9, 7)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2002, 9, 8)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2002, 9, 16)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2002, 9, 21)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2002, 9, 28)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "פסח"), + (NaiveDate::from_ymd_res(2002, 4, 3)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2002, 4, 17)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2002, 5, 17)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 9, 27)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2003, 9, 28)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2003, 10, 6)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2003, 10, 11)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2003, 10, 18)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "פסח"), + (NaiveDate::from_ymd_res(2003, 4, 23)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2003, 5, 7)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2003, 6, 6)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 9, 16)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2004, 9, 17)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2004, 9, 25)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2004, 9, 30)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2004, 10, 7)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2004, 4, 6)?, "פסח"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2004, 4, 27)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2004, 5, 26)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 10, 4)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2005, 10, 5)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2005, 10, 13)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2005, 10, 18)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2005, 10, 25)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2005, 4, 24)?, "פסח"), + (NaiveDate::from_ymd_res(2005, 4, 30)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2005, 5, 12)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2005, 6, 13)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 9, 23)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2006, 9, 24)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2006, 10, 2)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2006, 10, 7)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2006, 10, 14)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "פסח"), + (NaiveDate::from_ymd_res(2006, 4, 19)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2006, 5, 3)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2006, 6, 2)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 9, 13)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2007, 9, 14)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2007, 9, 22)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2007, 9, 27)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2007, 10, 4)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2007, 4, 3)?, "פסח"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2007, 4, 24)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2007, 5, 23)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 9, 30)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2008, 10, 9)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2008, 10, 14)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2008, 10, 21)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2008, 4, 20)?, "פסח"), + (NaiveDate::from_ymd_res(2008, 4, 26)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2008, 5, 8)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2008, 6, 9)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 9, 19)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2009, 9, 28)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2009, 10, 3)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2009, 10, 10)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "פסח"), + (NaiveDate::from_ymd_res(2009, 4, 15)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2009, 4, 29)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2009, 5, 29)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 9, 9)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2010, 9, 18)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2010, 9, 23)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2010, 9, 30)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2010, 3, 30)?, "פסח"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2010, 4, 20)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2010, 5, 19)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 9, 29)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2011, 9, 30)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2011, 10, 8)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2011, 10, 13)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2011, 10, 20)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2011, 4, 19)?, "פסח"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2011, 5, 10)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2011, 6, 8)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 9, 17)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2012, 9, 18)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2012, 9, 26)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2012, 10, 1)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2012, 10, 8)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2012, 4, 7)?, "פסח"), + (NaiveDate::from_ymd_res(2012, 4, 13)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2012, 4, 26)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 9, 5)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2013, 9, 6)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2013, 9, 14)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2013, 9, 19)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2013, 9, 26)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2013, 3, 26)?, "פסח"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2013, 4, 16)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2013, 5, 15)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 9, 25)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2014, 9, 26)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2014, 10, 9)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2014, 10, 16)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2014, 4, 15)?, "פסח"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2014, 5, 6)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2014, 6, 4)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 9, 14)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2015, 9, 15)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2015, 9, 23)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2015, 9, 28)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2015, 10, 5)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2015, 4, 4)?, "פסח"), + (NaiveDate::from_ymd_res(2015, 4, 10)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2015, 4, 23)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 10, 3)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2016, 10, 4)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2016, 10, 12)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2016, 10, 17)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2016, 10, 24)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2016, 4, 23)?, "פסח"), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2016, 5, 12)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2016, 6, 12)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 9, 21)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2017, 9, 22)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2017, 9, 30)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2017, 10, 5)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2017, 10, 12)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2017, 4, 11)?, "פסח"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2017, 5, 2)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2017, 5, 31)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 9, 10)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2018, 9, 11)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2018, 9, 19)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2018, 10, 1)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "פסח"), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2018, 4, 19)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 9, 30)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2019, 10, 1)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2019, 10, 9)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2019, 10, 21)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2019, 4, 20)?, "פסח"), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2019, 5, 9)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 9, 19)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2020, 9, 20)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2020, 9, 28)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2020, 10, 3)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2020, 10, 10)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "פסח"), + (NaiveDate::from_ymd_res(2020, 4, 15)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2020, 4, 29)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2020, 5, 29)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 9, 7)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2021, 9, 8)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2021, 9, 16)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2021, 9, 21)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2021, 9, 28)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2021, 3, 28)?, "פסח"), + (NaiveDate::from_ymd_res(2021, 4, 3)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2021, 4, 15)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2021, 5, 17)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 9, 26)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2022, 9, 27)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2022, 10, 5)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2022, 10, 17)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2022, 4, 16)?, "פסח"), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2022, 5, 5)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 9, 16)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2023, 9, 17)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2023, 9, 25)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2023, 9, 30)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2023, 10, 7)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "פסח"), + (NaiveDate::from_ymd_res(2023, 4, 12)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2023, 4, 26)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2023, 5, 26)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 10, 3)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2024, 10, 4)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2024, 10, 12)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2024, 10, 17)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2024, 10, 24)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2024, 4, 23)?, "פסח"), + (NaiveDate::from_ymd_res(2024, 4, 29)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2024, 5, 14)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2024, 6, 12)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 9, 23)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2025, 9, 24)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2025, 10, 2)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2025, 10, 7)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2025, 10, 14)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2025, 4, 13)?, "פסח"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2025, 6, 2)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 9, 12)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2026, 9, 13)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2026, 9, 21)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2026, 9, 26)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2026, 10, 3)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "פסח"), + (NaiveDate::from_ymd_res(2026, 4, 8)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2026, 4, 22)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2026, 5, 22)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 10, 2)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2027, 10, 3)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2027, 10, 16)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2027, 10, 23)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2027, 4, 22)?, "פסח"), + (NaiveDate::from_ymd_res(2027, 4, 28)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2027, 5, 12)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2027, 6, 11)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 9, 21)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2028, 9, 22)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2028, 9, 30)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2028, 10, 5)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2028, 10, 12)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2028, 4, 11)?, "פסח"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2028, 5, 2)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2028, 5, 31)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 9, 10)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2029, 9, 11)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2029, 9, 19)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2029, 9, 24)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2029, 10, 1)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "פסח"), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2029, 4, 19)?, "(נצפה) יום העצמאות"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 9, 28)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2030, 9, 29)?, "ראש השנה"), + (NaiveDate::from_ymd_res(2030, 10, 7)?, "יום כיפור"), + (NaiveDate::from_ymd_res(2030, 10, 12)?, "סוכות"), + ( + NaiveDate::from_ymd_res(2030, 10, 19)?, + "שמחת תורה/שמיני עצרת", + ), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "פסח"), + (NaiveDate::from_ymd_res(2030, 4, 24)?, "שביעי של פסח"), + (NaiveDate::from_ymd_res(2030, 5, 8)?, "יום העצמאות"), + (NaiveDate::from_ymd_res(2030, 6, 7)?, "שבועות"), + ], + &mut map, + Country::IL, + "Israel", + ); + + Ok(map) +} diff --git a/src/data/im.rs b/src/data/im.rs new file mode 100644 index 0000000..5966b81 --- /dev/null +++ b/src/data/im.rs @@ -0,0 +1,848 @@ +//! Isle of Man +use super::*; + +/// Generate holiday map for Isle of Man. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2000, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2000, 8, 28)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2000, 6, 2)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2000, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2001, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2001, 8, 27)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2001, 6, 1)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2001, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2002, 6, 4)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2002, 8, 26)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2002, 6, 7)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2002, 7, 5)?, "Tynwald Day"), + ( + NaiveDate::from_ymd_res(2002, 6, 3)?, + "Golden Jubilee of Elizabeth II", + ), + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2003, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2003, 8, 25)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2003, 6, 6)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2003, 7, 7)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2004, 8, 30)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2004, 6, 4)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2004, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2005, 5, 30)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2005, 8, 29)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2005, 6, 3)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2005, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2006, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2006, 8, 28)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2006, 6, 2)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2006, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2007, 8, 27)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2007, 6, 1)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2007, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2008, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2008, 8, 25)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2008, 6, 6)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2008, 7, 7)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2009, 8, 31)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2009, 6, 5)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2009, 7, 6)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2009, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2010, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2010, 8, 30)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2010, 6, 4)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2010, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2011, 5, 30)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2011, 8, 29)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2011, 6, 3)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2011, 7, 5)?, "Tynwald Day"), + ( + NaiveDate::from_ymd_res(2011, 4, 29)?, + "Wedding of William and Catherine", + ), + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2012, 6, 4)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2012, 8, 27)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2012, 6, 1)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2012, 7, 5)?, "Tynwald Day"), + ( + NaiveDate::from_ymd_res(2012, 6, 5)?, + "Diamond Jubilee of Elizabeth II", + ), + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2013, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2013, 8, 26)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2013, 6, 7)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2013, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2014, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2014, 8, 25)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2014, 6, 6)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2014, 7, 7)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2015, 8, 31)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2015, 6, 5)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2015, 7, 6)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2015, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2016, 5, 30)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2016, 8, 29)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2016, 6, 3)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2016, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2017, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2017, 8, 28)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2017, 6, 2)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2017, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2018, 8, 27)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2018, 6, 1)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2018, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2019, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2019, 8, 26)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2019, 6, 7)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2019, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "May Day"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2020, 8, 31)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2020, 6, 5)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2020, 7, 6)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2020, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2021, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2021, 8, 30)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2021, 6, 4)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2021, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "May Day"), + (NaiveDate::from_ymd_res(2022, 6, 2)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2022, 8, 29)?, + "Late Summer Bank Holiday", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 3)?, + "Platinum Jubilee of Elizabeth II; TT Bank Holiday", + ), + (NaiveDate::from_ymd_res(2022, 7, 5)?, "Tynwald Day"), + ( + NaiveDate::from_ymd_res(2022, 9, 19)?, + "State Funeral of Queen Elizabeth II", + ), + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2023, 8, 28)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2023, 6, 2)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2023, 7, 5)?, "Tynwald Day"), + ( + NaiveDate::from_ymd_res(2023, 5, 8)?, + "Coronation of Charles III", + ), + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2024, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2024, 8, 26)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2024, 6, 7)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2024, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 5, 5)?, "May Day"), + (NaiveDate::from_ymd_res(2025, 5, 26)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2025, 8, 25)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2025, 7, 7)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 5, 4)?, "May Day"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2026, 8, 31)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2026, 6, 5)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2026, 7, 6)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "May Day"), + (NaiveDate::from_ymd_res(2027, 5, 31)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2027, 8, 30)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2027, 6, 4)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2027, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "May Day"), + (NaiveDate::from_ymd_res(2028, 5, 29)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2028, 8, 28)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2028, 6, 2)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2028, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 5, 7)?, "May Day"), + (NaiveDate::from_ymd_res(2029, 5, 28)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2029, 8, 27)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2029, 6, 1)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2029, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 5, 6)?, "May Day"), + (NaiveDate::from_ymd_res(2030, 5, 27)?, "Spring Bank Holiday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2030, 8, 26)?, + "Late Summer Bank Holiday", + ), + (NaiveDate::from_ymd_res(2030, 6, 7)?, "TT Bank Holiday"), + (NaiveDate::from_ymd_res(2030, 7, 5)?, "Tynwald Day"), + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::IM, + "Isle of Man", + ); + + Ok(map) +} diff --git a/src/data/in.rs b/src/data/in.rs new file mode 100644 index 0000000..21751e2 --- /dev/null +++ b/src/data/in.rs @@ -0,0 +1,1454 @@ +//! India +use super::*; + +/// Generate holiday map for India. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2000, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2000, 4, 15)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2000, 6, 14)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2000, 4, 16)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2001, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 11, 14)?, "Diwali"), + (NaiveDate::from_ymd_res(2001, 3, 10)?, "Holi"), + ( + NaiveDate::from_ymd_res(2001, 4, 4)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2001, 4, 8)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2002, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 11, 4)?, "Diwali"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday; Holi"), + ( + NaiveDate::from_ymd_res(2002, 3, 24)?, + "Day of Ashura (estimated); Palm Sunday", + ), + (NaiveDate::from_ymd_res(2002, 5, 24)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 22)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2003, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 10, 25)?, "Diwali"), + (NaiveDate::from_ymd_res(2003, 3, 18)?, "Holi"), + ( + NaiveDate::from_ymd_res(2003, 3, 13)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2003, 5, 13)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 11)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2003, 4, 13)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2004, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2004, 10, 2)?, "Gandhi Jayanti"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Labour Day; Mawlid (estimated)", + ), + (NaiveDate::from_ymd_res(2004, 11, 12)?, "Diwali"), + (NaiveDate::from_ymd_res(2004, 3, 7)?, "Holi"), + ( + NaiveDate::from_ymd_res(2004, 3, 1)?, + "Day of Ashura (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 1)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2004, 4, 4)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2005, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Diwali"), + (NaiveDate::from_ymd_res(2005, 3, 26)?, "Holi"), + ( + NaiveDate::from_ymd_res(2005, 2, 19)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2005, 4, 21)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2005, 11, 3)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 21)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 22)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2005, 3, 20)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2006, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 10, 21)?, "Diwali"), + (NaiveDate::from_ymd_res(2006, 3, 15)?, "Holi"), + ( + NaiveDate::from_ymd_res(2006, 2, 9)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2006, 4, 10)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2006, 10, 23)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 10)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2006, 4, 9)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2007, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 11, 9)?, "Diwali"), + (NaiveDate::from_ymd_res(2007, 3, 4)?, "Holi"), + ( + NaiveDate::from_ymd_res(2007, 1, 29)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2007, 3, 31)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2007, 10, 13)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 20)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 21)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2007, 4, 1)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2008, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "Eid ul-Fitr (estimated); Gandhi Jayanti", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 10, 28)?, "Diwali"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Holi"), + ( + NaiveDate::from_ymd_res(2008, 1, 19)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 9)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2008, 3, 16)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 10, 17)?, "Diwali"), + (NaiveDate::from_ymd_res(2009, 3, 11)?, "Holi"), + ( + NaiveDate::from_ymd_res(2009, 1, 7)?, + "Day of Ashura (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 27)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2009, 3, 9)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2009, 9, 20)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 28)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2009, 4, 5)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2010, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2010, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 11, 5)?, "Diwali"), + (NaiveDate::from_ymd_res(2010, 3, 1)?, "Holi"), + ( + NaiveDate::from_ymd_res(2010, 12, 16)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2010, 2, 26)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2010, 9, 10)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 16)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2010, 3, 28)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2011, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2011, 10, 26)?, "Diwali"), + (NaiveDate::from_ymd_res(2011, 3, 20)?, "Holi"), + ( + NaiveDate::from_ymd_res(2011, 12, 5)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2011, 2, 15)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2011, 4, 17)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2012, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 11, 13)?, "Diwali"), + (NaiveDate::from_ymd_res(2012, 3, 8)?, "Holi"), + ( + NaiveDate::from_ymd_res(2012, 11, 24)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2012, 2, 4)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2012, 8, 19)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 26)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 27)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2012, 4, 1)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2013, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 11, 3)?, "Diwali"), + (NaiveDate::from_ymd_res(2013, 3, 27)?, "Holi"), + ( + NaiveDate::from_ymd_res(2013, 11, 13)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2013, 1, 24)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2013, 8, 8)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 15)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 16)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2013, 3, 24)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2014, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 10, 23)?, "Diwali"), + (NaiveDate::from_ymd_res(2014, 3, 17)?, "Holi"), + ( + NaiveDate::from_ymd_res(2014, 11, 3)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2014, 1, 13)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2014, 7, 28)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 4)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 5)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2014, 4, 13)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2015, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 11, 11)?, "Diwali"), + (NaiveDate::from_ymd_res(2015, 3, 6)?, "Holi"), + ( + NaiveDate::from_ymd_res(2015, 10, 23)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2015, 1, 3)?, "Mawlid (estimated)"), + (NaiveDate::from_ymd_res(2015, 12, 23)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2015, 7, 17)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 23)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 24)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2015, 3, 29)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2016, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2016, 10, 30)?, "Diwali"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Holi"), + ( + NaiveDate::from_ymd_res(2016, 10, 11)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2016, 12, 11)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2016, 7, 6)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 11)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2016, 3, 20)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2017, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 10, 19)?, "Diwali"), + (NaiveDate::from_ymd_res(2017, 3, 13)?, "Holi"), + ( + NaiveDate::from_ymd_res(2017, 9, 30)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2017, 11, 30)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2017, 6, 25)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 1)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 2)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2017, 4, 9)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2018, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 11, 7)?, "Diwali"), + (NaiveDate::from_ymd_res(2018, 3, 2)?, "Holi"), + ( + NaiveDate::from_ymd_res(2018, 9, 20)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2018, 11, 20)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2018, 6, 15)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 21)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 22)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2018, 3, 25)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2019, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 10, 27)?, "Diwali"), + (NaiveDate::from_ymd_res(2019, 3, 21)?, "Holi"), + ( + NaiveDate::from_ymd_res(2019, 9, 9)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2019, 11, 9)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2019, 6, 4)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 5)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 11)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2019, 4, 14)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 11, 14)?, "Diwali"), + (NaiveDate::from_ymd_res(2020, 3, 10)?, "Holi"), + ( + NaiveDate::from_ymd_res(2020, 8, 29)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2020, 10, 29)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2020, 5, 24)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 31)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 1)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2020, 4, 5)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2021, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2021, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 11, 4)?, "Diwali"), + (NaiveDate::from_ymd_res(2021, 3, 29)?, "Holi"), + ( + NaiveDate::from_ymd_res(2021, 8, 18)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2021, 10, 18)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2021, 3, 28)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2022, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2022, 10, 24)?, "Diwali"), + (NaiveDate::from_ymd_res(2022, 3, 18)?, "Holi"), + ( + NaiveDate::from_ymd_res(2022, 8, 8)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2022, 10, 8)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 9)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 10)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2022, 4, 10)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2023, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 11, 12)?, "Diwali"), + (NaiveDate::from_ymd_res(2023, 3, 8)?, "Holi"), + ( + NaiveDate::from_ymd_res(2023, 7, 28)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2023, 9, 27)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2023, 4, 21)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 22)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 28)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2023, 4, 2)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2024, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Diwali"), + (NaiveDate::from_ymd_res(2024, 3, 25)?, "Holi"), + ( + NaiveDate::from_ymd_res(2024, 7, 16)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2024, 9, 15)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2024, 4, 10)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2024, 3, 24)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2025, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 10, 20)?, "Diwali"), + (NaiveDate::from_ymd_res(2025, 3, 14)?, "Holi"), + ( + NaiveDate::from_ymd_res(2025, 7, 5)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2025, 9, 4)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2025, 4, 13)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2026, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 11, 8)?, "Diwali"), + (NaiveDate::from_ymd_res(2026, 3, 4)?, "Holi"), + ( + NaiveDate::from_ymd_res(2026, 6, 25)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2026, 8, 25)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2026, 3, 29)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2027, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2027, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 10, 29)?, "Diwali"), + (NaiveDate::from_ymd_res(2027, 3, 22)?, "Holi"), + ( + NaiveDate::from_ymd_res(2027, 6, 15)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2027, 8, 14)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Eid al-Adha (estimated); Feast of Pentecost", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2028, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 10, 17)?, "Diwali"), + (NaiveDate::from_ymd_res(2028, 3, 11)?, "Holi"), + ( + NaiveDate::from_ymd_res(2028, 6, 3)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2028, 8, 3)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2028, 4, 9)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2029, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 11, 5)?, "Diwali"), + (NaiveDate::from_ymd_res(2029, 3, 1)?, "Holi"), + ( + NaiveDate::from_ymd_res(2029, 5, 23)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2029, 7, 24)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "Eid al-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2029, 3, 25)?, "Palm Sunday"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 14)?, + "Makar Sankranti / Pongal", + ), + (NaiveDate::from_ymd_res(2030, 1, 26)?, "Republic Day"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 10, 2)?, "Gandhi Jayanti"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 10, 26)?, "Diwali"), + (NaiveDate::from_ymd_res(2030, 3, 20)?, "Holi"), + ( + NaiveDate::from_ymd_res(2030, 5, 12)?, + "Day of Ashura (estimated)", + ), + (NaiveDate::from_ymd_res(2030, 7, 13)?, "Mawlid (estimated)"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Eid ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Eid al-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "Eid al-Adha (estimated); Palm Sunday", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Easter Sunday"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Feast of Pentecost"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::IN, + "India", + ); + + Ok(map) +} diff --git a/src/data/is.rs b/src/data/is.rs new file mode 100644 index 0000000..218c772 --- /dev/null +++ b/src/data/is.rs @@ -0,0 +1,1004 @@ +//! Iceland +use super::*; + +/// Generate holiday map for Iceland. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nýársdagur"), + ( + NaiveDate::from_ymd_res(2000, 4, 20)?, + "Skírdagur; Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Annar í páskum"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2000, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2000, 8, 7)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2000, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2001, 4, 19)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2001, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2001, 8, 6)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2001, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2002, 4, 25)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2002, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2002, 8, 5)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2002, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2003, 4, 24)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2003, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2003, 8, 4)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2003, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2004, 4, 22)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2004, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2004, 8, 2)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2004, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2005, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2005, 8, 1)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2005, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2006, 4, 20)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2006, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2006, 8, 7)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2007, 4, 19)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2007, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2007, 8, 6)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2007, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2008, 4, 24)?, + "Sumardagurinn fyrsti", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Uppstigningardagur; Verkalýðsdagurinn", + ), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2008, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2008, 8, 4)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2008, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2009, 4, 23)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2009, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2009, 8, 3)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2009, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2010, 4, 22)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2010, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2010, 8, 2)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2010, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nýársdagur"), + ( + NaiveDate::from_ymd_res(2011, 4, 21)?, + "Skírdagur; Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Annar í páskum"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2011, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2011, 8, 1)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2011, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2012, 4, 19)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2012, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2012, 8, 6)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2012, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2013, 4, 25)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2013, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2013, 8, 5)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2013, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2014, 4, 24)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2014, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2014, 8, 4)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2014, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2015, 4, 23)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2015, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2015, 8, 3)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2015, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2016, 4, 21)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2016, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2016, 8, 1)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2016, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2017, 4, 20)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2017, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2017, 8, 7)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2017, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2018, 4, 19)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2018, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2018, 8, 6)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2018, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2019, 4, 25)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2019, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2019, 8, 5)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2019, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2020, 4, 23)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2020, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2020, 8, 3)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2020, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2021, 4, 22)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2021, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2021, 8, 2)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2021, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2022, 4, 21)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2022, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2022, 8, 1)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2022, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2023, 4, 20)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2023, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2023, 8, 7)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2023, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2024, 4, 25)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2024, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2024, 8, 5)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2024, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2025, 4, 24)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2025, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2025, 8, 4)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2025, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2026, 4, 23)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2026, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2026, 8, 3)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2026, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2027, 4, 22)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2027, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2027, 8, 2)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2027, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2028, 4, 20)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2028, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2028, 8, 7)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2028, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2029, 4, 19)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2029, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2029, 8, 6)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2029, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nýársdagur"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Skírdagur"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Föstudagurinn langi"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Páskadagur"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Annar í páskum"), + ( + NaiveDate::from_ymd_res(2030, 4, 25)?, + "Sumardagurinn fyrsti", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Verkalýðsdagurinn"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Uppstigningardagur"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Hvítasunnudagur"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Annar í hvítasunnu"), + (NaiveDate::from_ymd_res(2030, 6, 17)?, "Þjóðhátíðardagurinn"), + ( + NaiveDate::from_ymd_res(2030, 8, 5)?, + "Frídagur verslunarmanna", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Aðfangadagur"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Jóladagur"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Annar í jólum"), + (NaiveDate::from_ymd_res(2030, 12, 31)?, "Gamlársdagur"), + ], + &mut map, + Country::IS, + "Iceland", + ); + + Ok(map) +} diff --git a/src/data/it.rs b/src/data/it.rs new file mode 100644 index 0000000..fca352b --- /dev/null +++ b/src/data/it.rs @@ -0,0 +1,1162 @@ +//! Italy +use super::*; + +/// Generate holiday map for Italy. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2000, 4, 23)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2000, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2000, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2001, 4, 15)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2001, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2001, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2002, 3, 31)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2002, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2002, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2003, 4, 20)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2003, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2003, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2004, 4, 11)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2004, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2004, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2005, 3, 27)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2005, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2005, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2006, 4, 16)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2006, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2006, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2007, 4, 8)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2007, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2007, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2008, 3, 23)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2008, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2008, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2009, 4, 12)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2009, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2009, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2010, 4, 4)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2010, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2010, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2011, 4, 24)?, + "Pasqua di Resurrezione", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Festa della Liberazione; Lunedì dell'Angelo", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2011, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Santo Stefano"), + ( + NaiveDate::from_ymd_res(2011, 3, 17)?, + "Anniversario dell'Unità d'Italia", + ), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2012, 4, 8)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2012, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2012, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2013, 3, 31)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2013, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2013, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2014, 4, 20)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2014, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2014, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2015, 4, 5)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2015, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2015, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2016, 3, 27)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2016, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2016, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2017, 4, 16)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2017, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2017, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2018, 4, 1)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2018, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2018, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2019, 4, 21)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2019, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2019, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2020, 4, 12)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2020, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2020, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2021, 4, 4)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2021, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2021, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2022, 4, 17)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2022, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2023, 4, 9)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2023, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2023, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2024, 3, 31)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2024, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2024, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2025, 4, 20)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2025, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2025, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2026, 4, 5)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2026, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2026, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2027, 3, 28)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2027, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2027, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2028, 4, 16)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2028, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2028, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2029, 4, 1)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2029, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Capodanno"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Epifania del Signore"), + ( + NaiveDate::from_ymd_res(2030, 4, 21)?, + "Pasqua di Resurrezione", + ), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Lunedì dell'Angelo"), + ( + NaiveDate::from_ymd_res(2030, 4, 25)?, + "Festa della Liberazione", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Festa dei Lavoratori"), + ( + NaiveDate::from_ymd_res(2030, 6, 2)?, + "Festa della Repubblica", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Assunzione della Vergine", + ), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Tutti i Santi"), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "Immacolata Concezione", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Natale"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Santo Stefano"), + ], + &mut map, + Country::IT, + "Italy", + ); + + Ok(map) +} diff --git a/src/data/jm.rs b/src/data/jm.rs new file mode 100644 index 0000000..91e5d73 --- /dev/null +++ b/src/data/jm.rs @@ -0,0 +1,841 @@ +//! Jamaica +use super::*; + +/// Generate holiday map for Jamaica. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 3, 8)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2000, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2000, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2000, 8, 7)?, + "Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 16)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 2, 28)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2001, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2001, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2001, 10, 15)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 2, 13)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2002, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2002, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2002, 10, 21)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 3, 5)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2003, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2003, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2003, 10, 20)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 2, 25)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2004, 5, 24)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 8, 1)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2004, 8, 2)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 10, 18)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2005, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2005, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2005, 10, 17)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 3, 1)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2006, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2006, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2006, 8, 7)?, + "Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 16)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 2, 21)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2007, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2007, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 2, 6)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2008, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2008, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 20)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 2, 25)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2009, 5, 25)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2009, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2009, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2009, 10, 19)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 2, 17)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2010, 5, 24)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 8, 1)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2010, 8, 2)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 10, 18)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 3, 9)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2011, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2011, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2011, 10, 17)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 2, 22)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2012, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2012, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2012, 10, 15)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 2, 13)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2013, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2013, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2013, 10, 21)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 3, 5)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2014, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2014, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2014, 10, 20)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 2, 18)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2015, 5, 25)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2015, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2015, 10, 19)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 2, 10)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2016, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2016, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 17)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 3, 1)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2017, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2017, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2017, 8, 7)?, + "Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 16)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 2, 14)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2018, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2018, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2018, 10, 15)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 3, 6)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2019, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2019, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 21)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 2, 26)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2020, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 19)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 2, 17)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2021, 5, 24)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 8, 1)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2021, 8, 2)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 3, 2)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2022, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2022, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 17)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 2, 22)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2023, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2023, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2023, 8, 7)?, + "Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 16)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 2, 14)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2024, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2024, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 21)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 3, 5)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2025, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2025, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 20)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 2, 18)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2026, 5, 25)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2026, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 19)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 2, 10)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 23)?, "National Labour Day"), + ( + NaiveDate::from_ymd_res(2027, 5, 24)?, + "National Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 8, 1)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2027, 8, 2)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 18)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 3, 1)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2028, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2028, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2028, 8, 7)?, + "Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 16)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2029, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2029, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 15)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 3, 6)?, "Ash Wednesday"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 23)?, "National Labour Day"), + (NaiveDate::from_ymd_res(2030, 8, 1)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2030, 8, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 21)?, + "National Heroes Day", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::JM, + "Jamaica", + ); + + Ok(map) +} diff --git a/src/data/jp.rs b/src/data/jp.rs new file mode 100644 index 0000000..e754300 --- /dev/null +++ b/src/data/jp.rs @@ -0,0 +1,865 @@ +//! Japan +use super::*; + +/// Generate holiday map for Japan. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2000, 1, 10)?, "成人の日"), + (NaiveDate::from_ymd_res(2000, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2000, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2000, 4, 29)?, "みどりの日"), + (NaiveDate::from_ymd_res(2000, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2000, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2000, 7, 20)?, "海の日"), + (NaiveDate::from_ymd_res(2000, 9, 15)?, "敬老の日"), + (NaiveDate::from_ymd_res(2000, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "体育の日"), + (NaiveDate::from_ymd_res(2000, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2000, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2000, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2000, 5, 4)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2001, 1, 8)?, "成人の日"), + (NaiveDate::from_ymd_res(2001, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2001, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2001, 4, 29)?, "みどりの日"), + (NaiveDate::from_ymd_res(2001, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2001, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2001, 7, 20)?, "海の日"), + (NaiveDate::from_ymd_res(2001, 9, 15)?, "敬老の日"), + (NaiveDate::from_ymd_res(2001, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "体育の日"), + (NaiveDate::from_ymd_res(2001, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2001, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2001, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2001, 2, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2001, 4, 30)?, "振替休日"), + (NaiveDate::from_ymd_res(2001, 9, 24)?, "振替休日"), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "振替休日"), + (NaiveDate::from_ymd_res(2001, 5, 4)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2002, 1, 14)?, "成人の日"), + (NaiveDate::from_ymd_res(2002, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2002, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2002, 4, 29)?, "みどりの日"), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2002, 7, 20)?, "海の日"), + (NaiveDate::from_ymd_res(2002, 9, 15)?, "敬老の日"), + (NaiveDate::from_ymd_res(2002, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "体育の日"), + (NaiveDate::from_ymd_res(2002, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2002, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2002, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2002, 9, 16)?, "振替休日"), + (NaiveDate::from_ymd_res(2002, 11, 4)?, "振替休日"), + (NaiveDate::from_ymd_res(2002, 5, 4)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2003, 1, 13)?, "成人の日"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2003, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2003, 4, 29)?, "みどりの日"), + (NaiveDate::from_ymd_res(2003, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2003, 7, 21)?, "海の日"), + (NaiveDate::from_ymd_res(2003, 9, 15)?, "敬老の日"), + (NaiveDate::from_ymd_res(2003, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "体育の日"), + (NaiveDate::from_ymd_res(2003, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2003, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2003, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2003, 11, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2004, 1, 12)?, "成人の日"), + (NaiveDate::from_ymd_res(2004, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2004, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2004, 4, 29)?, "みどりの日"), + (NaiveDate::from_ymd_res(2004, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2004, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2004, 7, 19)?, "海の日"), + (NaiveDate::from_ymd_res(2004, 9, 20)?, "敬老の日"), + (NaiveDate::from_ymd_res(2004, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "体育の日"), + (NaiveDate::from_ymd_res(2004, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2004, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2004, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2004, 5, 4)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2005, 1, 10)?, "成人の日"), + (NaiveDate::from_ymd_res(2005, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2005, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2005, 4, 29)?, "みどりの日"), + (NaiveDate::from_ymd_res(2005, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2005, 7, 18)?, "海の日"), + (NaiveDate::from_ymd_res(2005, 9, 19)?, "敬老の日"), + (NaiveDate::from_ymd_res(2005, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "体育の日"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2005, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2005, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2005, 3, 21)?, "振替休日"), + (NaiveDate::from_ymd_res(2005, 5, 4)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2006, 1, 9)?, "成人の日"), + (NaiveDate::from_ymd_res(2006, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2006, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2006, 4, 29)?, "みどりの日"), + (NaiveDate::from_ymd_res(2006, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2006, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2006, 7, 17)?, "海の日"), + (NaiveDate::from_ymd_res(2006, 9, 18)?, "敬老の日"), + (NaiveDate::from_ymd_res(2006, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "体育の日"), + (NaiveDate::from_ymd_res(2006, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2006, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2006, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "振替休日"), + (NaiveDate::from_ymd_res(2006, 5, 4)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2007, 1, 8)?, "成人の日"), + (NaiveDate::from_ymd_res(2007, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2007, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2007, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2007, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2007, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2007, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2007, 7, 16)?, "海の日"), + (NaiveDate::from_ymd_res(2007, 9, 17)?, "敬老の日"), + (NaiveDate::from_ymd_res(2007, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "体育の日"), + (NaiveDate::from_ymd_res(2007, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2007, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2007, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2007, 2, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2007, 4, 30)?, "振替休日"), + (NaiveDate::from_ymd_res(2007, 9, 24)?, "振替休日"), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2008, 1, 14)?, "成人の日"), + (NaiveDate::from_ymd_res(2008, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2008, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2008, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2008, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2008, 7, 21)?, "海の日"), + (NaiveDate::from_ymd_res(2008, 9, 15)?, "敬老の日"), + (NaiveDate::from_ymd_res(2008, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "体育の日"), + (NaiveDate::from_ymd_res(2008, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2008, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2008, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2008, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2008, 11, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2009, 1, 12)?, "成人の日"), + (NaiveDate::from_ymd_res(2009, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2009, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2009, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2009, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2009, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2009, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2009, 7, 20)?, "海の日"), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "敬老の日"), + (NaiveDate::from_ymd_res(2009, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "体育の日"), + (NaiveDate::from_ymd_res(2009, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2009, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2009, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2009, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2009, 9, 22)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2010, 1, 11)?, "成人の日"), + (NaiveDate::from_ymd_res(2010, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2010, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2010, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2010, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2010, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2010, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2010, 7, 19)?, "海の日"), + (NaiveDate::from_ymd_res(2010, 9, 20)?, "敬老の日"), + (NaiveDate::from_ymd_res(2010, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "体育の日"), + (NaiveDate::from_ymd_res(2010, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2010, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2010, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2010, 3, 22)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2011, 1, 10)?, "成人の日"), + (NaiveDate::from_ymd_res(2011, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2011, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2011, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2011, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2011, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2011, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2011, 7, 18)?, "海の日"), + (NaiveDate::from_ymd_res(2011, 9, 19)?, "敬老の日"), + (NaiveDate::from_ymd_res(2011, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "体育の日"), + (NaiveDate::from_ymd_res(2011, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2011, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2011, 12, 23)?, "天皇誕生日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2012, 1, 9)?, "成人の日"), + (NaiveDate::from_ymd_res(2012, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2012, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2012, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2012, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2012, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2012, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2012, 7, 16)?, "海の日"), + (NaiveDate::from_ymd_res(2012, 9, 17)?, "敬老の日"), + (NaiveDate::from_ymd_res(2012, 9, 22)?, "秋分の日"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "体育の日"), + (NaiveDate::from_ymd_res(2012, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2012, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2012, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "振替休日"), + (NaiveDate::from_ymd_res(2012, 4, 30)?, "振替休日"), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2013, 1, 14)?, "成人の日"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2013, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2013, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2013, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2013, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2013, 7, 15)?, "海の日"), + (NaiveDate::from_ymd_res(2013, 9, 16)?, "敬老の日"), + (NaiveDate::from_ymd_res(2013, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "体育の日"), + (NaiveDate::from_ymd_res(2013, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2013, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2013, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2013, 11, 4)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2014, 1, 13)?, "成人の日"), + (NaiveDate::from_ymd_res(2014, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2014, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2014, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2014, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2014, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2014, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2014, 7, 21)?, "海の日"), + (NaiveDate::from_ymd_res(2014, 9, 15)?, "敬老の日"), + (NaiveDate::from_ymd_res(2014, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "体育の日"), + (NaiveDate::from_ymd_res(2014, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2014, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2014, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2014, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2014, 11, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2015, 1, 12)?, "成人の日"), + (NaiveDate::from_ymd_res(2015, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2015, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2015, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2015, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2015, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2015, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2015, 7, 20)?, "海の日"), + (NaiveDate::from_ymd_res(2015, 9, 21)?, "敬老の日"), + (NaiveDate::from_ymd_res(2015, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "体育の日"), + (NaiveDate::from_ymd_res(2015, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2015, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2015, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2015, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2015, 9, 22)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2016, 1, 11)?, "成人の日"), + (NaiveDate::from_ymd_res(2016, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2016, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2016, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2016, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2016, 7, 18)?, "海の日"), + (NaiveDate::from_ymd_res(2016, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2016, 9, 19)?, "敬老の日"), + (NaiveDate::from_ymd_res(2016, 9, 22)?, "秋分の日"), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "体育の日"), + (NaiveDate::from_ymd_res(2016, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2016, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2016, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2016, 3, 21)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2017, 1, 9)?, "成人の日"), + (NaiveDate::from_ymd_res(2017, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2017, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2017, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2017, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2017, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2017, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2017, 7, 17)?, "海の日"), + (NaiveDate::from_ymd_res(2017, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2017, 9, 18)?, "敬老の日"), + (NaiveDate::from_ymd_res(2017, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "体育の日"), + (NaiveDate::from_ymd_res(2017, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2017, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2017, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2018, 1, 8)?, "成人の日"), + (NaiveDate::from_ymd_res(2018, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2018, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2018, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2018, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2018, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2018, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2018, 7, 16)?, "海の日"), + (NaiveDate::from_ymd_res(2018, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2018, 9, 17)?, "敬老の日"), + (NaiveDate::from_ymd_res(2018, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "体育の日"), + (NaiveDate::from_ymd_res(2018, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2018, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2018, 12, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2018, 4, 30)?, "振替休日"), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "振替休日"), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2019, 1, 14)?, "成人の日"), + (NaiveDate::from_ymd_res(2019, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2019, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2019, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2019, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2019, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2019, 7, 15)?, "海の日"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2019, 9, 16)?, "敬老の日"), + (NaiveDate::from_ymd_res(2019, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "体育の日"), + (NaiveDate::from_ymd_res(2019, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2019, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2019, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2019, 8, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2019, 11, 4)?, "振替休日"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "天皇の即位の日"), + ( + NaiveDate::from_ymd_res(2019, 10, 22)?, + "即位礼正殿の儀が行われる日", + ), + (NaiveDate::from_ymd_res(2019, 4, 30)?, "国民の休日"), + (NaiveDate::from_ymd_res(2019, 5, 2)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2020, 1, 13)?, "成人の日"), + (NaiveDate::from_ymd_res(2020, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2020, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2020, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2020, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2020, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2020, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2020, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2020, 7, 23)?, "海の日"), + (NaiveDate::from_ymd_res(2020, 8, 10)?, "山の日"), + (NaiveDate::from_ymd_res(2020, 9, 21)?, "敬老の日"), + (NaiveDate::from_ymd_res(2020, 9, 22)?, "秋分の日"), + (NaiveDate::from_ymd_res(2020, 7, 24)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2020, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2020, 2, 24)?, "振替休日"), + (NaiveDate::from_ymd_res(2020, 5, 6)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2021, 1, 11)?, "成人の日"), + (NaiveDate::from_ymd_res(2021, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2021, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2021, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2021, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2021, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2021, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2021, 7, 22)?, "海の日"), + (NaiveDate::from_ymd_res(2021, 8, 8)?, "山の日"), + (NaiveDate::from_ymd_res(2021, 9, 20)?, "敬老の日"), + (NaiveDate::from_ymd_res(2021, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2021, 7, 23)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2021, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2021, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2021, 8, 9)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2022, 1, 10)?, "成人の日"), + (NaiveDate::from_ymd_res(2022, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2022, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2022, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2022, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2022, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2022, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2022, 7, 18)?, "海の日"), + (NaiveDate::from_ymd_res(2022, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2022, 9, 19)?, "敬老の日"), + (NaiveDate::from_ymd_res(2022, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2022, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2022, 11, 23)?, "勤労感謝の日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2023, 1, 9)?, "成人の日"), + (NaiveDate::from_ymd_res(2023, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2023, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2023, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2023, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2023, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2023, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2023, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2023, 7, 17)?, "海の日"), + (NaiveDate::from_ymd_res(2023, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2023, 9, 18)?, "敬老の日"), + (NaiveDate::from_ymd_res(2023, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2023, 10, 9)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2023, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2023, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2024, 1, 8)?, "成人の日"), + (NaiveDate::from_ymd_res(2024, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2024, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2024, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2024, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2024, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2024, 7, 15)?, "海の日"), + (NaiveDate::from_ymd_res(2024, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2024, 9, 16)?, "敬老の日"), + (NaiveDate::from_ymd_res(2024, 9, 22)?, "秋分の日"), + (NaiveDate::from_ymd_res(2024, 10, 14)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2024, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2024, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2024, 8, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2024, 9, 23)?, "振替休日"), + (NaiveDate::from_ymd_res(2024, 11, 4)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2025, 1, 13)?, "成人の日"), + (NaiveDate::from_ymd_res(2025, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2025, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2025, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2025, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2025, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2025, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2025, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2025, 7, 21)?, "海の日"), + (NaiveDate::from_ymd_res(2025, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2025, 9, 15)?, "敬老の日"), + (NaiveDate::from_ymd_res(2025, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2025, 10, 13)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2025, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2025, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2025, 2, 24)?, "振替休日"), + (NaiveDate::from_ymd_res(2025, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2025, 11, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2026, 1, 12)?, "成人の日"), + (NaiveDate::from_ymd_res(2026, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2026, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2026, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2026, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2026, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2026, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2026, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2026, 7, 20)?, "海の日"), + (NaiveDate::from_ymd_res(2026, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2026, 9, 21)?, "敬老の日"), + (NaiveDate::from_ymd_res(2026, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2026, 10, 12)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2026, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2026, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2026, 9, 22)?, "国民の休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2027, 1, 11)?, "成人の日"), + (NaiveDate::from_ymd_res(2027, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2027, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "春分の日"), + (NaiveDate::from_ymd_res(2027, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2027, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2027, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2027, 7, 19)?, "海の日"), + (NaiveDate::from_ymd_res(2027, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2027, 9, 20)?, "敬老の日"), + (NaiveDate::from_ymd_res(2027, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2027, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2027, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2027, 3, 22)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2028, 1, 10)?, "成人の日"), + (NaiveDate::from_ymd_res(2028, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2028, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2028, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2028, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2028, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2028, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2028, 7, 17)?, "海の日"), + (NaiveDate::from_ymd_res(2028, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2028, 9, 18)?, "敬老の日"), + (NaiveDate::from_ymd_res(2028, 9, 22)?, "秋分の日"), + (NaiveDate::from_ymd_res(2028, 10, 9)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2028, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2028, 11, 23)?, "勤労感謝の日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2029, 1, 8)?, "成人の日"), + (NaiveDate::from_ymd_res(2029, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2029, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2029, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2029, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2029, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2029, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2029, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2029, 7, 16)?, "海の日"), + (NaiveDate::from_ymd_res(2029, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2029, 9, 17)?, "敬老の日"), + (NaiveDate::from_ymd_res(2029, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2029, 10, 8)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2029, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2029, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2029, 4, 30)?, "振替休日"), + (NaiveDate::from_ymd_res(2029, 9, 24)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "元日"), + (NaiveDate::from_ymd_res(2030, 1, 14)?, "成人の日"), + (NaiveDate::from_ymd_res(2030, 2, 11)?, "建国記念の日"), + (NaiveDate::from_ymd_res(2030, 2, 23)?, "天皇誕生日"), + (NaiveDate::from_ymd_res(2030, 3, 20)?, "春分の日"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "昭和の日"), + (NaiveDate::from_ymd_res(2030, 5, 3)?, "憲法記念日"), + (NaiveDate::from_ymd_res(2030, 5, 4)?, "みどりの日"), + (NaiveDate::from_ymd_res(2030, 5, 5)?, "こどもの日"), + (NaiveDate::from_ymd_res(2030, 7, 15)?, "海の日"), + (NaiveDate::from_ymd_res(2030, 8, 11)?, "山の日"), + (NaiveDate::from_ymd_res(2030, 9, 16)?, "敬老の日"), + (NaiveDate::from_ymd_res(2030, 9, 23)?, "秋分の日"), + (NaiveDate::from_ymd_res(2030, 10, 14)?, "スポーツの日"), + (NaiveDate::from_ymd_res(2030, 11, 3)?, "文化の日"), + (NaiveDate::from_ymd_res(2030, 11, 23)?, "勤労感謝の日"), + (NaiveDate::from_ymd_res(2030, 5, 6)?, "振替休日"), + (NaiveDate::from_ymd_res(2030, 8, 12)?, "振替休日"), + (NaiveDate::from_ymd_res(2030, 11, 4)?, "振替休日"), + ], + &mut map, + Country::JP, + "Japan", + ); + + Ok(map) +} diff --git a/src/data/ke.rs b/src/data/ke.rs new file mode 100644 index 0000000..1ac145a --- /dev/null +++ b/src/data/ke.rs @@ -0,0 +1,751 @@ +//! Kenya +use super::*; + +/// Generate holiday map for Kenya. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2000, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2001, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2002, 10, 20)?, "Kenyatta Day"), + ( + NaiveDate::from_ymd_res(2002, 10, 21)?, + "Kenyatta Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2003, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2003, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Moi Day (observed)"), + (NaiveDate::from_ymd_res(2004, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2004, 12, 12)?, "Jamhuri Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 13)?, + "Jamhuri Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2005, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2005, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2006, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2006, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2007, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2007, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2008, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2008, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2009, 10, 20)?, "Kenyatta Day"), + (NaiveDate::from_ymd_res(2009, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2010, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2010, 12, 12)?, "Jamhuri Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 13)?, + "Jamhuri Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2011, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2011, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2012, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2012, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2013, 10, 20)?, "Mashujaa Day"), + ( + NaiveDate::from_ymd_res(2013, 10, 21)?, + "Mashujaa Day (observed)", + ), + (NaiveDate::from_ymd_res(2013, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 6, 1)?, "Madaraka Day"), + ( + NaiveDate::from_ymd_res(2014, 6, 2)?, + "Madaraka Day (observed)", + ), + (NaiveDate::from_ymd_res(2014, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2014, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2015, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2015, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2016, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2016, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2017, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2017, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2018, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2018, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2018, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2019, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2019, 10, 20)?, "Mashujaa Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 21)?, + "Mashujaa Day (observed)", + ), + (NaiveDate::from_ymd_res(2019, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2020, 10, 10)?, "Moi Day"), + (NaiveDate::from_ymd_res(2020, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2020, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2020, 2, 11)?, + "President Moi Celebration of Life Day", + ), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2021, 10, 10)?, "Utamaduni Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Utamaduni Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2021, 12, 12)?, "Jamhuri Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 13)?, + "Jamhuri Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2022, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2022, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2022, 4, 29)?, + "State Funeral for Former President Mwai Kibaki", + ), + (NaiveDate::from_ymd_res(2022, 8, 9)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2022, 9, 10)?, + "Day of Mourning for Queen Elizabeth II", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 11)?, + "Day of Mourning for Queen Elizabeth II", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 12)?, + "Day of Mourning for Queen Elizabeth II", + ), + (NaiveDate::from_ymd_res(2022, 9, 13)?, "Inauguration Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2023, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2023, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2023, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2024, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2024, 10, 20)?, "Mashujaa Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 21)?, + "Mashujaa Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 6, 1)?, "Madaraka Day"), + ( + NaiveDate::from_ymd_res(2025, 6, 2)?, + "Madaraka Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2025, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2025, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2026, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2026, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2026, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2027, 10, 10)?, "Utamaduni Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Utamaduni Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2027, 12, 12)?, "Jamhuri Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 13)?, + "Jamhuri Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2028, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2028, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2028, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2029, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2029, 10, 20)?, "Mashujaa Day"), + (NaiveDate::from_ymd_res(2029, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 6, 1)?, "Madaraka Day"), + (NaiveDate::from_ymd_res(2030, 10, 10)?, "Utamaduni Day"), + (NaiveDate::from_ymd_res(2030, 10, 20)?, "Mashujaa Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 21)?, + "Mashujaa Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 12, 12)?, "Jamhuri Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::KE, + "Kenya", + ); + + Ok(map) +} diff --git a/src/data/kr.rs b/src/data/kr.rs new file mode 100644 index 0000000..1973a70 --- /dev/null +++ b/src/data/kr.rs @@ -0,0 +1,868 @@ +//! South Korea +use super::*; + +/// Generate holiday map for South Korea. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2000, 2, 5)?, "설날"), + (NaiveDate::from_ymd_res(2000, 2, 4)?, "설날 전날"), + (NaiveDate::from_ymd_res(2000, 2, 6)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2000, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2000, 4, 5)?, "식목일"), + (NaiveDate::from_ymd_res(2000, 5, 11)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2000, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2000, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2000, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2000, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2000, 9, 12)?, "추석"), + (NaiveDate::from_ymd_res(2000, 9, 11)?, "추석 전날"), + (NaiveDate::from_ymd_res(2000, 9, 13)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2000, 4, 13)?, "국회의원 선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2001, 1, 24)?, "설날"), + (NaiveDate::from_ymd_res(2001, 1, 23)?, "설날 전날"), + (NaiveDate::from_ymd_res(2001, 1, 25)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2001, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2001, 4, 5)?, "식목일"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2001, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2001, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2001, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2001, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2001, 10, 1)?, "추석"), + (NaiveDate::from_ymd_res(2001, 9, 30)?, "추석 전날"), + (NaiveDate::from_ymd_res(2001, 10, 2)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "기독탄신일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "설날"), + (NaiveDate::from_ymd_res(2002, 2, 11)?, "설날 전날"), + (NaiveDate::from_ymd_res(2002, 2, 13)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2002, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2002, 4, 5)?, "식목일"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2002, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2002, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2002, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2002, 9, 21)?, "추석"), + (NaiveDate::from_ymd_res(2002, 9, 20)?, "추석 전날"), + (NaiveDate::from_ymd_res(2002, 9, 22)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2002, 6, 13)?, "지방선거일"), + ( + NaiveDate::from_ymd_res(2002, 7, 1)?, + "2002년 한일 월드컵 대표팀 4강 진출", + ), + (NaiveDate::from_ymd_res(2002, 12, 19)?, "대통령 선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2003, 2, 1)?, "설날"), + (NaiveDate::from_ymd_res(2003, 1, 31)?, "설날 전날"), + (NaiveDate::from_ymd_res(2003, 2, 2)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2003, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2003, 4, 5)?, "식목일"), + (NaiveDate::from_ymd_res(2003, 5, 8)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2003, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2003, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2003, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2003, 9, 11)?, "추석"), + (NaiveDate::from_ymd_res(2003, 9, 10)?, "추석 전날"), + (NaiveDate::from_ymd_res(2003, 9, 12)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "기독탄신일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2004, 1, 22)?, "설날"), + (NaiveDate::from_ymd_res(2004, 1, 21)?, "설날 전날"), + (NaiveDate::from_ymd_res(2004, 1, 23)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2004, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2004, 4, 5)?, "식목일"), + (NaiveDate::from_ymd_res(2004, 5, 26)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2004, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2004, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2004, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2004, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2004, 9, 28)?, "추석"), + (NaiveDate::from_ymd_res(2004, 9, 27)?, "추석 전날"), + (NaiveDate::from_ymd_res(2004, 9, 29)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2004, 4, 15)?, "국회의원 선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "설날"), + (NaiveDate::from_ymd_res(2005, 2, 8)?, "설날 전날"), + (NaiveDate::from_ymd_res(2005, 2, 10)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2005, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2005, 4, 5)?, "식목일"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2005, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2005, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2005, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2005, 9, 18)?, "추석"), + (NaiveDate::from_ymd_res(2005, 9, 17)?, "추석 전날"), + (NaiveDate::from_ymd_res(2005, 9, 19)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "기독탄신일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2006, 1, 29)?, "설날"), + (NaiveDate::from_ymd_res(2006, 1, 28)?, "설날 전날"), + (NaiveDate::from_ymd_res(2006, 1, 30)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2006, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2006, 5, 5)?, "석가탄신일; 어린이날"), + (NaiveDate::from_ymd_res(2006, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2006, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2006, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2006, 10, 6)?, "추석"), + (NaiveDate::from_ymd_res(2006, 10, 5)?, "추석 전날"), + (NaiveDate::from_ymd_res(2006, 10, 7)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2006, 5, 31)?, "지방선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2007, 2, 18)?, "설날"), + (NaiveDate::from_ymd_res(2007, 2, 17)?, "설날 전날"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2007, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2007, 5, 24)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2007, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2007, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2007, 7, 17)?, "제헌절"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2007, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2007, 9, 25)?, "추석"), + (NaiveDate::from_ymd_res(2007, 9, 24)?, "추석 전날"), + (NaiveDate::from_ymd_res(2007, 9, 26)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2007, 12, 19)?, "대통령 선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2008, 2, 7)?, "설날"), + (NaiveDate::from_ymd_res(2008, 2, 6)?, "설날 전날"), + (NaiveDate::from_ymd_res(2008, 2, 8)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2008, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2008, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2008, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2008, 9, 14)?, "추석"), + (NaiveDate::from_ymd_res(2008, 9, 13)?, "추석 전날"), + (NaiveDate::from_ymd_res(2008, 9, 15)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2008, 4, 9)?, "국회의원 선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "설날"), + (NaiveDate::from_ymd_res(2009, 1, 25)?, "설날 전날"), + (NaiveDate::from_ymd_res(2009, 1, 27)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2009, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2009, 5, 2)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2009, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2009, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2009, 10, 3)?, "개천절; 추석"), + (NaiveDate::from_ymd_res(2009, 10, 2)?, "추석 전날"), + (NaiveDate::from_ymd_res(2009, 10, 4)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "기독탄신일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2010, 2, 14)?, "설날"), + (NaiveDate::from_ymd_res(2010, 2, 13)?, "설날 전날"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2010, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2010, 5, 21)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2010, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2010, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2010, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2010, 9, 22)?, "추석"), + (NaiveDate::from_ymd_res(2010, 9, 21)?, "추석 전날"), + (NaiveDate::from_ymd_res(2010, 9, 23)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2010, 6, 2)?, "지방선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2011, 2, 3)?, "설날"), + (NaiveDate::from_ymd_res(2011, 2, 2)?, "설날 전날"), + (NaiveDate::from_ymd_res(2011, 2, 4)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2011, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2011, 5, 10)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2011, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2011, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2011, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2011, 9, 12)?, "추석"), + (NaiveDate::from_ymd_res(2011, 9, 11)?, "추석 전날"), + (NaiveDate::from_ymd_res(2011, 9, 13)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "기독탄신일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2012, 1, 23)?, "설날"), + (NaiveDate::from_ymd_res(2012, 1, 22)?, "설날 전날"), + (NaiveDate::from_ymd_res(2012, 1, 24)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2012, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2012, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2012, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2012, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2012, 9, 30)?, "추석"), + (NaiveDate::from_ymd_res(2012, 9, 29)?, "추석 전날"), + (NaiveDate::from_ymd_res(2012, 10, 1)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2012, 4, 11)?, "국회의원 선거일"), + (NaiveDate::from_ymd_res(2012, 12, 19)?, "대통령 선거일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2013, 2, 10)?, "설날"), + (NaiveDate::from_ymd_res(2013, 2, 9)?, "설날 전날"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2013, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2013, 5, 17)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2013, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2013, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2013, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2013, 9, 19)?, "추석"), + (NaiveDate::from_ymd_res(2013, 9, 18)?, "추석 전날"), + (NaiveDate::from_ymd_res(2013, 9, 20)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "기독탄신일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2014, 1, 31)?, "설날"), + (NaiveDate::from_ymd_res(2014, 1, 30)?, "설날 전날"), + (NaiveDate::from_ymd_res(2014, 2, 1)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2014, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2014, 5, 6)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2014, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2014, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2014, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2014, 9, 8)?, "추석"), + (NaiveDate::from_ymd_res(2014, 9, 7)?, "추석 전날"), + (NaiveDate::from_ymd_res(2014, 9, 9)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2014, 6, 4)?, "지방선거일"), + (NaiveDate::from_ymd_res(2014, 9, 10)?, "추석 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2015, 2, 19)?, "설날"), + (NaiveDate::from_ymd_res(2015, 2, 18)?, "설날 전날"), + (NaiveDate::from_ymd_res(2015, 2, 20)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2015, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2015, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2015, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2015, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2015, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2015, 9, 27)?, "추석"), + (NaiveDate::from_ymd_res(2015, 9, 26)?, "추석 전날"), + (NaiveDate::from_ymd_res(2015, 9, 28)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2015, 9, 29)?, "추석 대체 휴일"), + (NaiveDate::from_ymd_res(2015, 8, 14)?, "임시공휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "설날"), + (NaiveDate::from_ymd_res(2016, 2, 7)?, "설날 전날"), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2016, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2016, 5, 14)?, "석가탄신일"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2016, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2016, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2016, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2016, 9, 15)?, "추석"), + (NaiveDate::from_ymd_res(2016, 9, 14)?, "추석 전날"), + (NaiveDate::from_ymd_res(2016, 9, 16)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2016, 4, 13)?, "국회의원 선거일"), + (NaiveDate::from_ymd_res(2016, 2, 10)?, "설날 대체 휴일"), + (NaiveDate::from_ymd_res(2016, 5, 6)?, "임시공휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2017, 1, 28)?, "설날"), + (NaiveDate::from_ymd_res(2017, 1, 27)?, "설날 전날"), + (NaiveDate::from_ymd_res(2017, 1, 29)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2017, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2017, 5, 3)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2017, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2017, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2017, 10, 3)?, "개천절; 추석 전날"), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2017, 10, 4)?, "추석"), + (NaiveDate::from_ymd_res(2017, 10, 5)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2017, 1, 30)?, "설날 대체 휴일"), + (NaiveDate::from_ymd_res(2017, 10, 6)?, "추석 대체 휴일"), + (NaiveDate::from_ymd_res(2017, 5, 9)?, "대통령 선거일"), + (NaiveDate::from_ymd_res(2017, 10, 2)?, "임시공휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2018, 2, 16)?, "설날"), + (NaiveDate::from_ymd_res(2018, 2, 15)?, "설날 전날"), + (NaiveDate::from_ymd_res(2018, 2, 17)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2018, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2018, 5, 22)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2018, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2018, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2018, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2018, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "추석"), + (NaiveDate::from_ymd_res(2018, 9, 23)?, "추석 전날"), + (NaiveDate::from_ymd_res(2018, 9, 25)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2018, 6, 13)?, "지방선거일"), + (NaiveDate::from_ymd_res(2018, 5, 7)?, "어린이날 대체 휴일"), + (NaiveDate::from_ymd_res(2018, 9, 26)?, "추석 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "설날"), + (NaiveDate::from_ymd_res(2019, 2, 4)?, "설날 전날"), + (NaiveDate::from_ymd_res(2019, 2, 6)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2019, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2019, 5, 12)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2019, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2019, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2019, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2019, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2019, 9, 13)?, "추석"), + (NaiveDate::from_ymd_res(2019, 9, 12)?, "추석 전날"), + (NaiveDate::from_ymd_res(2019, 9, 14)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2019, 5, 6)?, "어린이날 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "설날"), + (NaiveDate::from_ymd_res(2020, 1, 24)?, "설날 전날"), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2020, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2020, 4, 30)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2020, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2020, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2020, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2020, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2020, 10, 1)?, "추석"), + (NaiveDate::from_ymd_res(2020, 9, 30)?, "추석 전날"), + (NaiveDate::from_ymd_res(2020, 10, 2)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2020, 4, 15)?, "국회의원 선거일"), + (NaiveDate::from_ymd_res(2020, 1, 27)?, "설날 대체 휴일"), + (NaiveDate::from_ymd_res(2020, 8, 17)?, "임시공휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "설날"), + (NaiveDate::from_ymd_res(2021, 2, 11)?, "설날 전날"), + (NaiveDate::from_ymd_res(2021, 2, 13)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2021, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2021, 5, 19)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2021, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2021, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2021, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2021, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2021, 9, 21)?, "추석"), + (NaiveDate::from_ymd_res(2021, 9, 20)?, "추석 전날"), + (NaiveDate::from_ymd_res(2021, 9, 22)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2021, 8, 16)?, "광복절 대체 휴일"), + (NaiveDate::from_ymd_res(2021, 10, 4)?, "개천절 대체 휴일"), + (NaiveDate::from_ymd_res(2021, 10, 11)?, "한글날 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2022, 2, 1)?, "설날"), + (NaiveDate::from_ymd_res(2022, 1, 31)?, "설날 전날"), + (NaiveDate::from_ymd_res(2022, 2, 2)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2022, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2022, 5, 8)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2022, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2022, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2022, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2022, 9, 10)?, "추석"), + (NaiveDate::from_ymd_res(2022, 9, 9)?, "추석 전날"), + (NaiveDate::from_ymd_res(2022, 9, 11)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2022, 3, 9)?, "대통령 선거일"), + (NaiveDate::from_ymd_res(2022, 6, 1)?, "지방선거일"), + (NaiveDate::from_ymd_res(2022, 9, 12)?, "추석 대체 휴일"), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "한글날 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2023, 1, 22)?, "설날"), + (NaiveDate::from_ymd_res(2023, 1, 21)?, "설날 전날"), + (NaiveDate::from_ymd_res(2023, 1, 23)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2023, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2023, 5, 27)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2023, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2023, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2023, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2023, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2023, 9, 29)?, "추석"), + (NaiveDate::from_ymd_res(2023, 9, 28)?, "추석 전날"), + (NaiveDate::from_ymd_res(2023, 9, 30)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2023, 1, 24)?, "설날 대체 휴일"), + ( + NaiveDate::from_ymd_res(2023, 5, 29)?, + "부처님오신날 대체 휴일", + ), + (NaiveDate::from_ymd_res(2023, 10, 2)?, "임시공휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2024, 2, 10)?, "설날"), + (NaiveDate::from_ymd_res(2024, 2, 9)?, "설날 전날"), + (NaiveDate::from_ymd_res(2024, 2, 11)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2024, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2024, 5, 15)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2024, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2024, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2024, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2024, 9, 17)?, "추석"), + (NaiveDate::from_ymd_res(2024, 9, 16)?, "추석 전날"), + (NaiveDate::from_ymd_res(2024, 9, 18)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "국회의원 선거일"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "설날 대체 휴일"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "어린이날 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2025, 1, 29)?, "설날"), + (NaiveDate::from_ymd_res(2025, 1, 28)?, "설날 전날"), + (NaiveDate::from_ymd_res(2025, 1, 30)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2025, 3, 1)?, "삼일절"), + ( + NaiveDate::from_ymd_res(2025, 5, 5)?, + "부처님오신날; 어린이날", + ), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2025, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2025, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2025, 10, 6)?, "추석"), + (NaiveDate::from_ymd_res(2025, 10, 5)?, "추석 전날"), + (NaiveDate::from_ymd_res(2025, 10, 7)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "삼일절 대체 휴일"), + ( + NaiveDate::from_ymd_res(2025, 5, 6)?, + "부처님오신날 대체 휴일; 어린이날 대체 휴일", + ), + (NaiveDate::from_ymd_res(2025, 10, 8)?, "추석 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "설날"), + (NaiveDate::from_ymd_res(2026, 2, 16)?, "설날 전날"), + (NaiveDate::from_ymd_res(2026, 2, 18)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2026, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2026, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2026, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2026, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2026, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2026, 9, 25)?, "추석"), + (NaiveDate::from_ymd_res(2026, 9, 24)?, "추석 전날"), + (NaiveDate::from_ymd_res(2026, 9, 26)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2026, 6, 3)?, "지방선거일"), + (NaiveDate::from_ymd_res(2026, 3, 2)?, "삼일절 대체 휴일"), + ( + NaiveDate::from_ymd_res(2026, 5, 25)?, + "부처님오신날 대체 휴일", + ), + (NaiveDate::from_ymd_res(2026, 8, 17)?, "광복절 대체 휴일"), + (NaiveDate::from_ymd_res(2026, 10, 5)?, "개천절 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2027, 2, 7)?, "설날"), + (NaiveDate::from_ymd_res(2027, 2, 6)?, "설날 전날"), + (NaiveDate::from_ymd_res(2027, 2, 8)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2027, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2027, 5, 13)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2027, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2027, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2027, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2027, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2027, 9, 15)?, "추석"), + (NaiveDate::from_ymd_res(2027, 9, 14)?, "추석 전날"), + (NaiveDate::from_ymd_res(2027, 9, 16)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2027, 3, 3)?, "대통령 선거일"), + (NaiveDate::from_ymd_res(2027, 2, 9)?, "설날 대체 휴일"), + (NaiveDate::from_ymd_res(2027, 8, 16)?, "광복절 대체 휴일"), + (NaiveDate::from_ymd_res(2027, 10, 4)?, "개천절 대체 휴일"), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "한글날 대체 휴일"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "기독탄신일 대체 휴일", + ), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2028, 1, 27)?, "설날"), + (NaiveDate::from_ymd_res(2028, 1, 26)?, "설날 전날"), + (NaiveDate::from_ymd_res(2028, 1, 28)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2028, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2028, 5, 2)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2028, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2028, 10, 3)?, "개천절; 추석"), + (NaiveDate::from_ymd_res(2028, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2028, 10, 2)?, "추석 전날"), + (NaiveDate::from_ymd_res(2028, 10, 4)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2028, 4, 12)?, "국회의원 선거일"), + (NaiveDate::from_ymd_res(2028, 10, 5)?, "추석 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "설날"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "설날 전날"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2029, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2029, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2029, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2029, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2029, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2029, 9, 22)?, "추석"), + (NaiveDate::from_ymd_res(2029, 9, 21)?, "추석 전날"), + (NaiveDate::from_ymd_res(2029, 9, 23)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2029, 5, 7)?, "어린이날 대체 휴일"), + ( + NaiveDate::from_ymd_res(2029, 5, 21)?, + "부처님오신날 대체 휴일", + ), + (NaiveDate::from_ymd_res(2029, 9, 24)?, "추석 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "신정연휴"), + (NaiveDate::from_ymd_res(2030, 2, 3)?, "설날"), + (NaiveDate::from_ymd_res(2030, 2, 2)?, "설날 전날"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "설날 다음날"), + (NaiveDate::from_ymd_res(2030, 3, 1)?, "삼일절"), + (NaiveDate::from_ymd_res(2030, 5, 9)?, "부처님오신날"), + (NaiveDate::from_ymd_res(2030, 5, 5)?, "어린이날"), + (NaiveDate::from_ymd_res(2030, 6, 6)?, "현충일"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "광복절"), + (NaiveDate::from_ymd_res(2030, 10, 3)?, "개천절"), + (NaiveDate::from_ymd_res(2030, 10, 9)?, "한글날"), + (NaiveDate::from_ymd_res(2030, 9, 12)?, "추석"), + (NaiveDate::from_ymd_res(2030, 9, 11)?, "추석 전날"), + (NaiveDate::from_ymd_res(2030, 9, 13)?, "추석 다음날"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "기독탄신일"), + (NaiveDate::from_ymd_res(2030, 6, 12)?, "지방선거일"), + (NaiveDate::from_ymd_res(2030, 2, 5)?, "설날 대체 휴일"), + (NaiveDate::from_ymd_res(2030, 5, 6)?, "어린이날 대체 휴일"), + ], + &mut map, + Country::KR, + "South Korea", + ); + + Ok(map) +} diff --git a/src/data/kz.rs b/src/data/kz.rs new file mode 100644 index 0000000..735d14d --- /dev/null +++ b/src/data/kz.rs @@ -0,0 +1,1665 @@ +//! Kazakhstan +use super::*; + +/// Generate holiday map for Kazakhstan. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "New Year"), + ( + NaiveDate::from_ymd_res(2000, 3, 8)?, + "International Women's Day", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2000, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2000, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2000, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2000, 12, 16)?, + "Kazakhstan Independence Day", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "New Year"), + ( + NaiveDate::from_ymd_res(2001, 3, 8)?, + "International Women's Day", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2001, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2001, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2001, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Kazakhstan Independence Day", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "New Year"), + ( + NaiveDate::from_ymd_res(2002, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2002, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2002, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2002, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 17)?, + "Kazakhstan Independence Day", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "New Year"), + ( + NaiveDate::from_ymd_res(2003, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2003, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2003, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2003, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2003, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2003, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 10)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 1)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 27)?, + "Republic Day (observed)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "New Year"), + ( + NaiveDate::from_ymd_res(2004, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2004, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2004, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2004, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2004, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 3)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 10)?, + "Victory Day (observed)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "New Year"), + ( + NaiveDate::from_ymd_res(2005, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2005, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2005, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2005, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2005, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2005, 1, 3)?, "New Year (observed)"), + (NaiveDate::from_ymd_res(2005, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 19)?, + "Kazakhstan Independence Day (observed)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2006, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2006, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2006, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2006, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2006, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2006, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2006, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2006, 1, 3)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2006, 12, 18)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 19)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 10)?, + "Kurban Ait (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2007, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2007, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2007, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2007, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2007, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2007, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2007, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 18)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 20)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2008, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2008, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2008, 5, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2008, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2008, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2008, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 10)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 1)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 27)?, + "Republic Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2009, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2009, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2009, 3, 22)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2009, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2009, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2009, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 23)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 11)?, + "Victory Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 31)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2010, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2010, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2010, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2010, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2010, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2010, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2010, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2010, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2010, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2010, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 3)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 10)?, + "Victory Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 16)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2011, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2011, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2011, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2011, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2011, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2011, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2011, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2011, 1, 3)?, "New Year (observed)"), + (NaiveDate::from_ymd_res(2011, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 19)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2012, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2012, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2012, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2012, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2012, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + (NaiveDate::from_ymd_res(2012, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2012, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2012, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2012, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2012, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2012, 1, 3)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2012, 12, 3)?, + "First President Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 18)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 26)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2013, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2013, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2013, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2013, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2013, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2013, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2013, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2013, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2013, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 8)?, + "Capital Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 2)?, + "First President Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 15)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2014, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2014, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2014, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2014, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2014, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2014, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2014, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2014, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2014, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2014, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 10)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 7)?, + "Capital Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 1)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 4)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2015, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2015, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2015, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2015, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2015, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2015, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2015, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2015, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2015, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2015, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 9)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 11)?, + "Victory Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 31)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 23)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2016, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2016, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2016, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2016, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2016, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2016, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2016, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2016, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2016, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 10)?, + "Defender of the Fatherland Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 19)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 11)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2017, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2017, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2017, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2017, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2017, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2017, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2017, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2017, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2017, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2017, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2017, 1, 3)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2017, 5, 8)?, + "Defender of the Fatherland Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 18)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 19)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 1)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2018, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2018, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2018, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2018, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2018, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2018, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2018, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2018, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2018, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 3)?, + "First President Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 18)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 21)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2019, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2019, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2019, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2019, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2019, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2019, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2019, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2019, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2019, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 8)?, + "Capital Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 2)?, + "First President Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 11)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2020, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2020, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2020, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2020, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2020, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2020, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2020, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2020, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2020, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2020, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 17)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 9)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 11)?, + "Victory Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 31)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 31)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2021, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2021, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2021, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2021, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2021, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2021, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2021, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2021, 12, 1)?, "First President Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 17)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2021, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2021, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 10)?, + "Victory Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2022, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2022, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2022, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2022, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2022, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2022, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2022, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2022, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 16)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2022, 1, 3)?, "New Year (observed)"), + (NaiveDate::from_ymd_res(2022, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 10)?, + "Defender of the Fatherland Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 9)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2023, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2023, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2023, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2023, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2023, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2023, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2023, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2023, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2023, 12, 16)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2023, 1, 3)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2023, 5, 8)?, + "Defender of the Fatherland Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 18)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 28)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2024, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2024, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2024, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2024, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2024, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2024, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2024, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 8)?, + "Capital Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2025, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2025, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2025, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2025, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2025, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2025, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2025, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2025, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2025, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 10)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 7)?, + "Capital Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 1)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 27)?, + "Republic Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2026, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2026, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2026, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2026, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2026, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2026, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2026, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2026, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 9)?, + "International Women's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 11)?, + "Victory Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 31)?, + "Constitution Day of the Republic of Kazakhstan (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 26)?, + "Republic Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2027, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2027, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2027, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2027, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2027, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2027, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2027, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 16)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2027, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2027, 3, 24)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 3)?, + "Kazakhstan People Solidarity Holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 10)?, + "Victory Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2028, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2028, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2028, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2028, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2028, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2028, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2028, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2028, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2028, 12, 16)?, + "Kazakhstan Independence Day", + ), + (NaiveDate::from_ymd_res(2028, 1, 3)?, "New Year (observed)"), + (NaiveDate::from_ymd_res(2028, 1, 4)?, "New Year (observed)"), + ( + NaiveDate::from_ymd_res(2028, 5, 8)?, + "Defender of the Fatherland Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 18)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2029, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2029, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2029, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2029, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2029, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2029, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2029, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2029, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 17)?, + "Kazakhstan Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "New Year"), + (NaiveDate::from_ymd_res(2030, 1, 7)?, "Orthodox Christmas"), + ( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2030, 3, 22)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2030, 3, 21)?, "Nauryz holiday"), + (NaiveDate::from_ymd_res(2030, 3, 23)?, "Nauryz holiday"), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Kazakhstan People Solidarity Holiday", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 7)?, + "Defender of the Fatherland Day", + ), + (NaiveDate::from_ymd_res(2030, 5, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2030, 7, 6)?, "Capital Day"), + ( + NaiveDate::from_ymd_res(2030, 8, 30)?, + "Constitution Day of the Republic of Kazakhstan", + ), + (NaiveDate::from_ymd_res(2030, 10, 25)?, "Republic Day"), + ( + NaiveDate::from_ymd_res(2030, 12, 16)?, + "Kazakhstan Independence Day", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 25)?, + "Nauryz holiday (observed)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 8)?, + "Capital Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Kurban Ait (estimated)", + ), + ], + &mut map, + Country::KZ, + "Kazakhstan", + ); + + Ok(map) +} diff --git a/src/data/li.rs b/src/data/li.rs new file mode 100644 index 0000000..9662d00 --- /dev/null +++ b/src/data/li.rs @@ -0,0 +1,851 @@ +//! Liechtenstein +use super::*; + +/// Generate holiday map for Liechtenstein. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2000, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2000, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2000, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2000, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2001, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2001, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2001, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2001, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2002, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2002, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2002, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2002, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2003, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2003, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2003, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2003, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2004, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2004, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2004, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2004, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2005, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2005, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2005, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2005, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2006, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2006, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2006, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2006, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2007, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2007, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2007, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2007, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2008, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2008, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Ostermontag"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Auffahrt; Tag der Arbeit", + ), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2008, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2009, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2009, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2009, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2009, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2010, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2010, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2010, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2010, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2011, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2011, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2011, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2011, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2012, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2012, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2012, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2012, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2013, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2013, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2013, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2014, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2014, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2014, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2014, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2015, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2015, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2015, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2015, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2016, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2016, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2016, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2016, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2017, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2017, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2017, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2017, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2018, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2018, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2018, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2018, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2019, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2019, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2019, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2019, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2020, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2020, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2020, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2020, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2021, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2021, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2021, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2021, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2022, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2022, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2022, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2022, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2023, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2023, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2023, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2023, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2024, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2024, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2024, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2024, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2025, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2025, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2025, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2025, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2026, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2026, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2026, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2026, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2027, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2027, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2027, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2027, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2028, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2028, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2028, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2028, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2029, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2029, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2029, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2029, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2030, 2, 2)?, "Mariä Lichtmess"), + (NaiveDate::from_ymd_res(2030, 3, 19)?, "Josefstag"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Auffahrt"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Staatsfeiertag"), + (NaiveDate::from_ymd_res(2030, 9, 8)?, "Mariä Geburt"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2030, 12, 8)?, "Mariä Empfängnis"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Weihnachten"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Stephanstag"), + ], + &mut map, + Country::LI, + "Liechtenstein", + ); + + Ok(map) +} diff --git a/src/data/ls.rs b/src/data/ls.rs new file mode 100644 index 0000000..55bece2 --- /dev/null +++ b/src/data/ls.rs @@ -0,0 +1,672 @@ +//! Lesotho +use super::*; + +/// Generate holiday map for Lesotho. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2000, 4, 4)?, "Heroes Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2000, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2000, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2001, 4, 4)?, "Heroes Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2001, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2001, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2002, 4, 4)?, "Heroes Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2002, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2002, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + (NaiveDate::from_ymd_res(2002, 5, 25)?, "Africa Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2003, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2003, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2003, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2004, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2004, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2004, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2005, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2005, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2005, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2006, 3, 11)?, "Moshoeshoe's Day"), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Africa/Heroes Day; Ascension Day", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2006, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2006, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2007, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2007, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2007, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2008, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Ascension Day; Workers' Day", + ), + (NaiveDate::from_ymd_res(2008, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2008, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2009, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2009, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2010, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2010, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2010, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2011, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2011, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2011, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2012, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2012, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2012, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2012, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2013, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2013, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2013, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2014, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2014, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2015, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2016, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2016, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2016, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2017, 3, 11)?, "Moshoeshoe's Day"), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Africa/Heroes Day; Ascension Day", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2017, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2017, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2018, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2018, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2018, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2019, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2019, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2019, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2020, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2020, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2021, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2021, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2021, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2022, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2022, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2022, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2023, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2023, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2023, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2023, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2024, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2024, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2024, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2025, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2025, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2025, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2026, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2026, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2027, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2027, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2027, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 3, 11)?, "Moshoeshoe's Day"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Africa/Heroes Day; Ascension Day", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2028, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2028, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2029, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2029, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2029, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 3, 11)?, "Moshoeshoe's Day"), + (NaiveDate::from_ymd_res(2030, 5, 25)?, "Africa/Heroes Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2030, 7, 17)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2030, 10, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::LS, + "Lesotho", + ); + + Ok(map) +} diff --git a/src/data/lt.rs b/src/data/lt.rs new file mode 100644 index 0000000..4f207ba --- /dev/null +++ b/src/data/lt.rs @@ -0,0 +1,1652 @@ +//! Lithuania +use super::*; + +/// Generate holiday map for Lithuania. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2000, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2000, 5, 7)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2000, 6, 4)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2000, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2000, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2001, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2001, 5, 6)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2001, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2001, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2002, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2002, 4, 1)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2002, 6, 2)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2002, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2002, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2003, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2003, 4, 21)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2003, 5, 4)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2003, 6, 1)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2003, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2003, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2004, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2004, 5, 2)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2004, 6, 6)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2004, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2004, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2005, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2005, 3, 28)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Motinos diena; Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2005, 6, 5)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2005, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2005, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2006, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2006, 4, 17)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2006, 5, 7)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2006, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2006, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2007, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2007, 5, 6)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2007, 6, 3)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2007, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2007, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2008, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2008, 5, 4)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2008, 6, 1)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2008, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2008, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2009, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2009, 4, 13)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2009, 5, 3)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2009, 6, 7)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2009, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2009, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2010, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2010, 5, 2)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2010, 6, 6)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2010, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2010, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2011, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Motinos diena; Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2011, 6, 5)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2011, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2011, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2012, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2012, 4, 9)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2012, 5, 6)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2012, 6, 3)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2012, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2012, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2013, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2013, 4, 1)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2013, 6, 2)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2013, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2014, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2014, 5, 4)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2014, 6, 1)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2014, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2015, 4, 6)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2015, 5, 3)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2015, 6, 7)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2015, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2016, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2016, 3, 28)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Motinos diena; Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2016, 6, 5)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2016, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2016, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2017, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2017, 5, 7)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2017, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2018, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2018, 4, 2)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2018, 5, 6)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2018, 6, 3)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2018, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2019, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2019, 5, 5)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2019, 6, 2)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2019, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Visų Šventųjų diena"), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2020, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2020, 4, 13)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2020, 5, 3)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2020, 6, 7)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2020, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2020, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2021, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2021, 4, 5)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2021, 6, 6)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2021, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2021, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2022, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2022, 4, 18)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Motinos diena; Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2022, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2022, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2022, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2023, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2023, 4, 10)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2023, 5, 7)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2023, 6, 4)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2023, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2023, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2023, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2024, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2024, 6, 2)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2024, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2024, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2024, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2025, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2025, 5, 4)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2025, 6, 1)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2025, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2025, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2025, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2026, 4, 6)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2026, 5, 3)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2026, 6, 7)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2026, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2026, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2026, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2027, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2027, 3, 29)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2027, 6, 6)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2027, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2027, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2028, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2028, 5, 7)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2028, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2028, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2028, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2029, 4, 2)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2029, 5, 6)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2029, 6, 3)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2029, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2029, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2029, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Naujųjų metų diena"), + ( + NaiveDate::from_ymd_res(2030, 2, 16)?, + "Lietuvos valstybės atkūrimo diena", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 11)?, + "Lietuvos nepriklausomybės atkūrimo diena", + ), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Šv. Velykos"), + ( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Antroji šv. Velykų diena", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Tarptautinė darbo diena", + ), + (NaiveDate::from_ymd_res(2030, 5, 5)?, "Motinos diena"), + (NaiveDate::from_ymd_res(2030, 6, 2)?, "Tėvo diena"), + ( + NaiveDate::from_ymd_res(2030, 6, 24)?, + "Rasos ir Joninių diena", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 6)?, + "Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) ir Tautiškos giesmės diena", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)", + ), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Visų Šventųjų diena"), + ( + NaiveDate::from_ymd_res(2030, 11, 2)?, + "Mirusiųjų atminimo (Vėlinių) diena", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Kūčių diena"), + ( + NaiveDate::from_ymd_res(2030, 12, 25)?, + "Šv. Kalėdų pirma diena", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Šv. Kalėdų antra diena", + ), + ], + &mut map, + Country::LT, + "Lithuania", + ); + + Ok(map) +} diff --git a/src/data/lu.rs b/src/data/lu.rs new file mode 100644 index 0000000..2e0452d --- /dev/null +++ b/src/data/lu.rs @@ -0,0 +1,741 @@ +//! Luxembourg +use super::*; + +/// Generate holiday map for Luxembourg. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2000, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2001, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2002, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2003, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2004, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2005, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2006, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2007, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Ostermontag"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Christi Himmelfahrt; Tag der Arbeit", + ), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2008, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2009, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2010, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2013, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2014, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2015, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2016, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2017, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2018, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2019, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2019, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2020, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2020, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2021, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2021, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2022, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2022, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2023, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2023, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Tag der Arbeit"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Christi Himmelfahrt; Europatag", + ), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2024, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2025, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2025, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2026, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2026, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2027, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2027, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2028, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2028, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2029, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2029, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Neujahr"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Ostermontag"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Tag der Arbeit"), + (NaiveDate::from_ymd_res(2030, 5, 9)?, "Europatag"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Christi Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Pfingstmontag"), + (NaiveDate::from_ymd_res(2030, 6, 23)?, "Nationalfeiertag"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Weihnachten"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Zweiter Weihnachtsfeiertag", + ), + ], + &mut map, + Country::LU, + "Luxembourg", + ); + + Ok(map) +} diff --git a/src/data/lv.rs b/src/data/lv.rs new file mode 100644 index 0000000..f8ecb2a --- /dev/null +++ b/src/data/lv.rs @@ -0,0 +1,1054 @@ +//! Latvia +use super::*; + +/// Generate holiday map for Latvia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Darba svētki"), + (NaiveDate::from_ymd_res(2000, 5, 14)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2000, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2000, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2000, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2000, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Darba svētki"), + (NaiveDate::from_ymd_res(2001, 5, 13)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2001, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2001, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2001, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2001, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2002, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2002, 5, 12)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2002, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2002, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2002, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2002, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2003, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2003, 5, 11)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2003, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2003, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2003, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2003, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2004, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2004, 5, 9)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2004, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2004, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2004, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2004, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2005, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2005, 5, 8)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2005, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2005, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2005, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2005, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2006, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2006, 5, 14)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2006, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2006, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2006, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2007, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2007, 5, 13)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2007, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2007, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2007, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 19)?, + "Latvijas Republikas proklamēšanas diena (brīvdiena)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2007, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2008, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 5)?, + "Latvijas Republikas Neatkarības atjaunošanas diena (brīvdiena)", + ), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2008, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2008, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2008, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2008, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2009, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2009, 5, 10)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2009, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2009, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2009, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2009, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2010, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2010, 5, 9)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2010, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2010, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2010, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2010, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2011, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2011, 5, 8)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2011, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2011, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2011, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2012, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2012, 5, 13)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2012, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2012, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 19)?, + "Latvijas Republikas proklamēšanas diena (brīvdiena)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2012, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2013, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 6)?, + "Latvijas Republikas Neatkarības atjaunošanas diena (brīvdiena)", + ), + (NaiveDate::from_ymd_res(2013, 5, 12)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2013, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2013, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2013, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2013, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2014, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 5)?, + "Latvijas Republikas Neatkarības atjaunošanas diena (brīvdiena)", + ), + (NaiveDate::from_ymd_res(2014, 5, 11)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2014, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2014, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2014, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2014, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2015, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2015, 5, 10)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2015, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2015, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2015, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2015, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2016, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2016, 5, 8)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2016, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2016, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2016, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2016, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2017, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2017, 5, 14)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2017, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2017, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2017, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 20)?, + "Latvijas Republikas proklamēšanas diena (brīvdiena)", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2017, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2018, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2018, 5, 13)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2018, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2018, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2018, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 19)?, + "Latvijas Republikas proklamēšanas diena (brīvdiena)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2018, 12, 31)?, "Vecgada vakars"), + ( + NaiveDate::from_ymd_res(2018, 7, 9)?, + "Vispārējo latviešu Dziesmu un deju svētku noslēguma dienu", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 24)?, + "Viņa Svētības pāvesta Franciska pastorālās vizītes Latvijā diena", + ), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2019, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 6)?, + "Latvijas Republikas Neatkarības atjaunošanas diena (brīvdiena)", + ), + (NaiveDate::from_ymd_res(2019, 5, 12)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2019, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2019, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2019, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2019, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2020, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2020, 5, 10)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2020, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2020, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2020, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2020, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2021, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2021, 5, 9)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2021, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2021, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2021, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2021, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2022, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2022, 5, 8)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2022, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2022, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2022, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2022, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2023, + vec![ + + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Darba svētki"), + (NaiveDate::from_ymd_res(2023, 5, 4)?, "Latvijas Republikas Neatkarības atjaunošanas diena"), + (NaiveDate::from_ymd_res(2023, 5, 14)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2023, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2023, 6, 24)?, "Jāņu diena"), + (NaiveDate::from_ymd_res(2023, 11, 18)?, "Latvijas Republikas proklamēšanas diena"), + (NaiveDate::from_ymd_res(2023, 11, 20)?, "Latvijas Republikas proklamēšanas diena (brīvdiena)"), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Ziemassvētku vakars"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2023, 12, 31)?, "Vecgada vakars"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā"), + (NaiveDate::from_ymd_res(2023, 7, 10)?, "Vispārējo latviešu Dziesmu un deju svētku noslēguma dienu"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2024, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 6)?, + "Latvijas Republikas Neatkarības atjaunošanas diena (brīvdiena)", + ), + (NaiveDate::from_ymd_res(2024, 5, 12)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2024, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2024, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2024, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2024, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2025, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 5)?, + "Latvijas Republikas Neatkarības atjaunošanas diena (brīvdiena)", + ), + (NaiveDate::from_ymd_res(2025, 5, 11)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2025, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2025, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2025, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2025, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2026, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2026, 5, 10)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2026, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2026, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2026, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2026, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2027, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2027, 5, 9)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2027, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2027, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2027, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2027, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2028, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2028, 5, 14)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2028, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2028, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2028, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 20)?, + "Latvijas Republikas proklamēšanas diena (brīvdiena)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2028, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2029, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + (NaiveDate::from_ymd_res(2029, 5, 13)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2029, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2029, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2029, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 19)?, + "Latvijas Republikas proklamēšanas diena (brīvdiena)", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2029, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Jaunais Gads"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Lielā Piektdiena"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Lieldienas"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Otrās Lieldienas"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Darba svētki"), + ( + NaiveDate::from_ymd_res(2030, 5, 4)?, + "Latvijas Republikas Neatkarības atjaunošanas diena", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 6)?, + "Latvijas Republikas Neatkarības atjaunošanas diena (brīvdiena)", + ), + (NaiveDate::from_ymd_res(2030, 5, 12)?, "Mātes diena"), + (NaiveDate::from_ymd_res(2030, 6, 23)?, "Līgo diena"), + (NaiveDate::from_ymd_res(2030, 6, 24)?, "Jāņu diena"), + ( + NaiveDate::from_ymd_res(2030, 11, 18)?, + "Latvijas Republikas proklamēšanas diena", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 24)?, + "Ziemassvētku vakars", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Ziemassvētki"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Otrie Ziemassvētki"), + (NaiveDate::from_ymd_res(2030, 12, 31)?, "Vecgada vakars"), + ], + &mut map, + Country::LV, + "Latvia", + ); + + Ok(map) +} diff --git a/src/data/ma.rs b/src/data/ma.rs new file mode 100644 index 0000000..0cde4d9 --- /dev/null +++ b/src/data/ma.rs @@ -0,0 +1,1504 @@ +//! Morocco +use super::*; + +/// Generate holiday map for Morocco. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2000, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2000, 3, 3)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2000, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2000, 7, 9)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2000, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2000, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2000, 1, 8)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2000, 12, 27)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2000, 1, 9)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2000, 12, 28)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2000, 3, 16)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2000, 3, 17)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2001, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2001, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2001, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2001, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2001, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2001, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2001, 12, 17)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2001, 3, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2001, 3, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 5)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2002, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2002, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2002, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2002, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2002, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2002, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2002, 12, 5)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2002, 12, 6)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2002, 2, 22)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2002, 2, 23)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2002, 3, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 25)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2003, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2003, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2003, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2003, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2003, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2003, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2003, 11, 26)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2003, 3, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2004, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "(تقدير) عيد المولد النبوي; عيد العمال", + ), + (NaiveDate::from_ymd_res(2004, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2004, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2004, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2004, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2004, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2004, 11, 15)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2004, 2, 2)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2004, 2, 21)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 2)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2005, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2005, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2005, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2005, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2005, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2005, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2005, 11, 4)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2005, 1, 22)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 22)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "(تقدير) عيد الأضحى; ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2006, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2006, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2006, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2006, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2006, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2006, 1, 31)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 10)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 11)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "(تقدير) عيد الأضحى; رأس السنة الميلادية", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2007, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2007, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2007, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2007, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2007, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2007, 10, 14)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2007, 12, 21)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2007, 1, 20)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 1)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2008, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2008, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2008, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2008, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2008, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2008, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2008, 10, 2)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2008, 12, 9)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2008, 1, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 29)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 21)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2009, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2009, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2009, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2009, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2009, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2009, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2009, 11, 28)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2009, 12, 18)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 10)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2010, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2010, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2010, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2010, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2010, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2010, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2010, 9, 11)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2010, 12, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 27)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2011, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2011, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2011, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2011, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "(تقدير) عيد الأضحى; ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2011, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2011, 8, 31)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2011, 11, 7)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2011, 11, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 16)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2012, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2012, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2012, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "(تقدير) عيد الفطر; ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2012, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2012, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2012, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2012, 10, 27)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2012, 11, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 5)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2013, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2013, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2013, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2013, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2013, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2013, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2013, 8, 9)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2013, 10, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 25)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2014, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2014, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2014, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2014, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2014, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2014, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2014, 7, 29)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2014, 10, 5)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2014, 10, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2015, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2015, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2015, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2015, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2015, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2015, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2015, 7, 18)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2015, 9, 23)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2015, 10, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 23)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2016, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2016, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2016, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2016, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2016, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2016, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2016, 7, 7)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2016, 9, 11)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2016, 10, 2)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 11)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 12)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2017, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2017, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2017, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2017, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2017, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2017, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2017, 6, 26)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2017, 9, 2)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2017, 9, 21)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 30)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 1)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2018, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2018, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2018, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 21)?, + "(تقدير) عيد الأضحى; عيد الشباب", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2018, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2018, 6, 16)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2018, 9, 11)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 20)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 21)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2019, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2019, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2019, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2019, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2019, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2019, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2019, 8, 12)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2019, 8, 31)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 10)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2020, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2020, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2020, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 20)?, + "(تقدير) رأس السنة الهجرية; ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2020, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2020, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2020, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2020, 8, 1)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2020, 10, 29)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 30)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2021, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2021, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2021, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2021, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2021, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2021, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2021, 5, 14)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2021, 7, 21)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2021, 8, 9)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 19)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2022, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "عيد العمال"), + ( + NaiveDate::from_ymd_res(2022, 7, 30)?, + "(تقدير) رأس السنة الهجرية; عيد العرش", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2022, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2022, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2022, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2022, 10, 8)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2023, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2023, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2023, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2023, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2023, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2023, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2023, 7, 19)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 27)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 28)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2024, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2024, 1, 13)?, + "رأس السنة الأمازيغية", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2024, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2024, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2024, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2024, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2024, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2024, 4, 11)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2024, 6, 17)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2024, 7, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 16)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2025, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 13)?, + "رأس السنة الأمازيغية", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2025, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2025, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2025, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2025, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2025, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2025, 3, 30)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2025, 3, 31)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2025, 6, 7)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 5)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2026, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2026, 1, 13)?, + "رأس السنة الأمازيغية", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2026, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2026, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2026, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2026, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2026, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2026, 3, 20)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2026, 3, 21)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2026, 5, 27)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2026, 5, 28)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2026, 6, 16)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 26)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2027, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 13)?, + "رأس السنة الأمازيغية", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2027, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "(تقدير) عيد المولد النبوي; ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2027, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2027, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2027, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2027, 3, 9)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2027, 3, 10)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2028, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 13)?, + "رأس السنة الأمازيغية", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2028, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2028, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2028, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2028, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2028, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2028, 2, 26)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2028, 2, 27)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2028, 5, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2029, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2029, 1, 13)?, + "رأس السنة الأمازيغية", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2029, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2029, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2029, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2029, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2029, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2029, 2, 15)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2029, 4, 24)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2029, 4, 25)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 25)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "رأس السنة الميلادية"), + ( + NaiveDate::from_ymd_res(2030, 1, 11)?, + "ذكرى تقديم وثيقة الاستقلال", + ), + ( + NaiveDate::from_ymd_res(2030, 1, 13)?, + "رأس السنة الأمازيغية", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2030, 7, 30)?, "عيد العرش"), + ( + NaiveDate::from_ymd_res(2030, 8, 14)?, + "ذكرى استرجاع إقليم وادي الذهب", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 20)?, + "ذكرى ثورة الملك و الشعب", + ), + (NaiveDate::from_ymd_res(2030, 8, 21)?, "عيد الشباب"), + ( + NaiveDate::from_ymd_res(2030, 11, 6)?, + "ذكرى المسيرة الخضراء", + ), + (NaiveDate::from_ymd_res(2030, 11, 18)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2030, 2, 5)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2030, 4, 13)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2030, 4, 14)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::MA, + "Morocco", + ); + + Ok(map) +} diff --git a/src/data/md.rs b/src/data/md.rs new file mode 100644 index 0000000..ad9e037 --- /dev/null +++ b/src/data/md.rs @@ -0,0 +1,985 @@ +//! Moldova +use super::*; + +/// Generate holiday map for Moldova. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2000, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "Paștele"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Paștele; Ziua internaţională a solidarităţii oamenilor muncii", + ), + (NaiveDate::from_ymd_res(2000, 5, 8)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2000, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2000, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2001, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Paștele"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2001, 4, 23)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2001, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2002, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2002, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2002, 5, 13)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2002, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2003, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Paștele"), + (NaiveDate::from_ymd_res(2003, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2003, 5, 5)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2003, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2004, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Paștele"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Paștele"), + (NaiveDate::from_ymd_res(2004, 4, 19)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2004, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2005, + vec![ + + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2005, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul)"), + (NaiveDate::from_ymd_res(2005, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul)"), + (NaiveDate::from_ymd_res(2005, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Paștele; Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2005, 5, 9)?, "Paștele blajinilor; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2005, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2005, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2006, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "Paștele"), + (NaiveDate::from_ymd_res(2006, 4, 24)?, "Paștele"), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Paștele blajinilor; Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2006, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2007, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Paștele"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Paștele"), + (NaiveDate::from_ymd_res(2007, 4, 16)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2007, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2008, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Paștele"), + (NaiveDate::from_ymd_res(2008, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2008, 5, 5)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2008, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2009, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "Paștele"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2009, 4, 27)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2009, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2010, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Paștele"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2010, 4, 12)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2010, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2011, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Paștele"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Paștele"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2011, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2012, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "Paștele"), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2012, 4, 23)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2012, 8, 31)?, "Limba noastră"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2013, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul)", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2013, 5, 13)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2013, 8, 31)?, "Limba noastră"), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)", + ), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2014, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Paștele"), + (NaiveDate::from_ymd_res(2014, 4, 28)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2014, 8, 31)?, "Limba noastră"), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)", + ), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2015, 1, 7)?, + "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 8)?, + "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 8)?, + "Ziua internatională a femeii", + ), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "Paștele"), + (NaiveDate::from_ymd_res(2015, 4, 13)?, "Paștele"), + (NaiveDate::from_ymd_res(2015, 4, 20)?, "Paștele blajinilor"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Ziua internaţională a solidarităţii oamenilor muncii", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 9)?, + "Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 27)?, + "Ziua independenţei Republicii Moldova", + ), + (NaiveDate::from_ymd_res(2015, 8, 31)?, "Limba noastră"), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)", + ), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2016, + vec![ + + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2016, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2016, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2016, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Paștele; Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2016, 5, 9)?, "Paștele blajinilor; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2016, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2016, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2016, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2017, + vec![ + + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2017, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2017, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2017, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Paștele"), + (NaiveDate::from_ymd_res(2017, 4, 24)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2017, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2017, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2017, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2017, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2018, + vec![ + + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2018, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2018, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "Paștele"), + (NaiveDate::from_ymd_res(2018, 4, 9)?, "Paștele"), + (NaiveDate::from_ymd_res(2018, 4, 16)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2018, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2018, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2018, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2018, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2019, + vec![ + + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2019, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2019, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2019, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "Paștele"), + (NaiveDate::from_ymd_res(2019, 5, 6)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2019, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2019, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2019, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2019, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2020, + vec![ + + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2020, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2020, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "Paștele"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2020, 4, 27)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2020, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2020, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2020, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2021, + vec![ + + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2021, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2021, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2021, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "Paștele"), + (NaiveDate::from_ymd_res(2021, 5, 10)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2021, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2021, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2021, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2021, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2022, + vec![ + + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2022, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2022, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2022, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "Paștele"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "Paștele"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2022, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2022, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2022, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2022, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2023, + vec![ + + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2023, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2023, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2023, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "Paștele"), + (NaiveDate::from_ymd_res(2023, 4, 24)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2023, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2023, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2023, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2023, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2024, + vec![ + + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2024, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2024, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2024, 5, 13)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2024, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2024, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2024, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2025, + vec![ + + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2025, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2025, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2025, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Paștele"), + (NaiveDate::from_ymd_res(2025, 4, 28)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2025, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2025, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2025, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2025, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2026, + vec![ + + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2026, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2026, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2026, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "Paștele"), + (NaiveDate::from_ymd_res(2026, 4, 13)?, "Paștele"), + (NaiveDate::from_ymd_res(2026, 4, 20)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2026, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2026, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2026, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2026, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2027, + vec![ + + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2027, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2027, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2027, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "Paștele"), + (NaiveDate::from_ymd_res(2027, 5, 10)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2027, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2027, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2027, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2027, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2028, + vec![ + + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2028, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2028, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2028, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Paștele"), + (NaiveDate::from_ymd_res(2028, 4, 24)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2028, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2028, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2028, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2028, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2029, + vec![ + + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2029, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2029, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "Paștele"), + (NaiveDate::from_ymd_res(2029, 4, 9)?, "Paștele"), + (NaiveDate::from_ymd_res(2029, 4, 16)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2029, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2029, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2029, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2029, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + build_year( + years, + 2030, + vec![ + + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2030, 1, 7)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2030, 1, 8)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil vechi)"), + (NaiveDate::from_ymd_res(2030, 3, 8)?, "Ziua internatională a femeii"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "Paștele"), + (NaiveDate::from_ymd_res(2030, 5, 6)?, "Paștele blajinilor"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Ziua internaţională a solidarităţii oamenilor muncii"), + (NaiveDate::from_ymd_res(2030, 5, 9)?, "Ziua Europei; Ziua Victoriei și a comemorării eroilor căzuţi pentru Independenţa Patriei"), + (NaiveDate::from_ymd_res(2030, 6, 1)?, "Ziua Ocrotirii Copilului"), + (NaiveDate::from_ymd_res(2030, 8, 27)?, "Ziua independenţei Republicii Moldova"), + (NaiveDate::from_ymd_res(2030, 8, 31)?, "Limba noastră"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Nașterea lui Iisus Hristos (Crăciunul pe stil nou)"), + ], + &mut map, + Country::MD, + "Moldova", + ); + + Ok(map) +} diff --git a/src/data/mg.rs b/src/data/mg.rs new file mode 100644 index 0000000..c2c87e7 --- /dev/null +++ b/src/data/mg.rs @@ -0,0 +1,1180 @@ +//! Madagascar +use super::*; + +/// Generate holiday map for Madagascar. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2000, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2000, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2000, 6, 1)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2000, 6, 12)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2000, 5, 28)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2000, 6, 18)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2000, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2001, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2001, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2001, 5, 24)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2001, 5, 27)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2001, 6, 17)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2001, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2002, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2002, 5, 20)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2002, 5, 26)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2002, 6, 16)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2002, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2003, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2003, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2003, 5, 29)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2003, 6, 9)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2003, 5, 25)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2003, 6, 15)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2003, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2004, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2004, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2004, 5, 20)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2004, 5, 31)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2004, 6, 6)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2004, 6, 20)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2004, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2005, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2005, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2005, 5, 5)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2005, 5, 16)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2005, 5, 29)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2005, 6, 19)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2005, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2006, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2006, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2006, 6, 5)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2006, 5, 28)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2006, 6, 18)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2006, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2007, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2007, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2007, 5, 17)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2007, 5, 28)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2007, 6, 3)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2007, 6, 17)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2007, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2008, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2008, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Alatsinain'ny paska"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Fetin'ny asa; Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2008, 5, 12)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2008, 5, 25)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2008, 6, 15)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2008, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2009, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2009, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2009, 5, 21)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2009, 6, 1)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2009, 6, 7)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2009, 6, 21)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2009, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2010, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2010, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2010, 5, 13)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2010, 5, 24)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2010, 5, 30)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2010, 6, 20)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2010, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2011, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2011, 6, 2)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2011, 6, 13)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2011, 5, 29)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2011, 6, 19)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2011, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2011, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2012, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2012, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2012, 5, 17)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2012, 5, 28)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2012, 6, 3)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2012, 6, 17)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2012, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2012, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2013, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2013, 5, 20)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2013, 5, 26)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2013, 6, 16)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2013, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2013, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2014, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2014, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2014, 5, 29)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2014, 6, 9)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2014, 5, 25)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2014, 6, 15)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2014, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2014, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2015, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2015, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2015, 5, 14)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2015, 5, 25)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2015, 5, 31)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2015, 6, 21)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2015, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2015, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2016, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2016, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2016, 5, 5)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2016, 5, 16)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2016, 5, 29)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2016, 6, 19)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2016, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2016, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2017, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2017, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2017, 6, 5)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2017, 5, 28)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2017, 6, 18)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2017, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2018, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2018, 5, 10)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2018, 5, 21)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2018, 5, 27)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2018, 6, 17)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2018, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2018, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2019, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2019, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2019, 5, 30)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2019, 6, 10)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2019, 5, 26)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2019, 6, 16)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2019, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2019, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2020, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2020, 5, 21)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2020, 6, 1)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2020, 6, 7)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2020, 6, 21)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2020, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2020, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2021, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2021, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2021, 5, 24)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2021, 5, 30)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2021, 6, 20)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2021, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2021, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2022, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2022, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2022, 5, 26)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2022, 6, 6)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2022, 5, 29)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2022, 6, 19)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2022, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2022, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2023, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2023, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2023, 5, 18)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2023, 5, 29)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2023, 6, 4)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2023, 6, 18)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2023, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2023, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2024, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2024, 5, 20)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2024, 5, 26)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2024, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2024, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2025, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2025, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2025, 5, 29)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2025, 6, 9)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2025, 5, 25)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2025, 6, 15)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2025, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2026, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2026, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2026, 5, 14)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2026, 5, 25)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2026, 5, 31)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2026, 6, 21)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2026, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2026, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2027, 3, 8)?, "Fetin'ny vehivavy"), + ( + NaiveDate::from_ymd_res(2027, 3, 29)?, + "Alatsinain'ny paska; Fetin'ny mahery fo", + ), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2027, 5, 6)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2027, 5, 30)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2027, 6, 20)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2027, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2027, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2028, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2028, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2028, 6, 5)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2028, 6, 18)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2028, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2028, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2029, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2029, 5, 10)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2029, 5, 21)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2029, 5, 27)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2029, 6, 17)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2029, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2029, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Taom-baovao"), + (NaiveDate::from_ymd_res(2030, 3, 8)?, "Fetin'ny vehivavy"), + (NaiveDate::from_ymd_res(2030, 3, 29)?, "Fetin'ny mahery fo"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Fetin'ny paska"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Alatsinain'ny paska"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Fetin'ny asa"), + ( + NaiveDate::from_ymd_res(2030, 5, 30)?, + "Fiakaran'ny Jesosy kristy tany an-danitra", + ), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pentekosta"), + ( + NaiveDate::from_ymd_res(2030, 6, 10)?, + "Alatsinain'ny pentekosta", + ), + (NaiveDate::from_ymd_res(2030, 5, 26)?, "Fetin'ny reny"), + (NaiveDate::from_ymd_res(2030, 6, 16)?, "Fetin'ny ray"), + ( + NaiveDate::from_ymd_res(2030, 6, 26)?, + "Fetin'ny fahaleovantena", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Fiakaran'ny Masina Maria tany an-danitra", + ), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Fetin'ny olo-masina"), + (NaiveDate::from_ymd_res(2030, 12, 11)?, "Fetin'ny Repoblika"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Fetin'ny noely"), + ], + &mut map, + Country::MG, + "Madagascar", + ); + + Ok(map) +} diff --git a/src/data/mk.rs b/src/data/mk.rs new file mode 100644 index 0000000..e3d2238 --- /dev/null +++ b/src/data/mk.rs @@ -0,0 +1,1309 @@ +//! North Macedonia +use super::*; + +/// Generate holiday map for North Macedonia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Easter Monday (Orthodox); Labour Day", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2000, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2000, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2000, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Eid al-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2001, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2001, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2001, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2001, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2001, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2002, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 6)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2002, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2002, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2002, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2003, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2003, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2003, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2003, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2003, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2004, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2004, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2004, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2004, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2005, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2005, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2005, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 3)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2006, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2006, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2006, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle; Eid al-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2007, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2007, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2007, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2007, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 13)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2008, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2008, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2008, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2008, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2009, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 20)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2009, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2009, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2009, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2009, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 20)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2010, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2010, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2010, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2010, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 10)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2011, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2011, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2011, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 16)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2012, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2012, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2012, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2012, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 19)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2013, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 6)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2013, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2013, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2013, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2013, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 8)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2014, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2014, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2014, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2014, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2014, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 28)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2015, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 13)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2015, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2015, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2015, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2015, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 17)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2016, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2016, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2016, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 6)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2017, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2017, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2017, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 25)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2018, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 9)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2018, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2018, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2018, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2018, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 15)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2019, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 29)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2019, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2019, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2019, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 4)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 20)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2020, 5, 24)?, + "Eid al-Fitr (estimated); Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2020, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2020, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2021, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2021, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2021, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2021, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2022, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2022, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 17)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2023, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2023, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2023, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 21)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2024, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 6)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2024, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2024, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2024, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 10)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2025, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2025, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2025, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2026, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 13)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2026, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2026, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2026, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 3)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2027, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2027, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2027, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2028, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2028, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2028, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2029, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 9)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2029, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2029, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2029, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2030, 1, 7)?, + "Christmas Day (Orthodox)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 29)?, + "Easter Monday (Orthodox)", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2030, 5, 24)?, + "Saints Cyril and Methodius Day", + ), + (NaiveDate::from_ymd_res(2030, 8, 2)?, "Republic Day"), + (NaiveDate::from_ymd_res(2030, 9, 8)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 11)?, + "Day of Macedonian Uprising in 1941", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 23)?, + "Day of the Macedonian Revolutionary Struggle", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "Saint Clement of Ohrid Day", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Eid al-Fitr (estimated)", + ), + ], + &mut map, + Country::MK, + "North Macedonia", + ); + + Ok(map) +} diff --git a/src/data/mod.rs b/src/data/mod.rs new file mode 100644 index 0000000..409a065 --- /dev/null +++ b/src/data/mod.rs @@ -0,0 +1,311 @@ +mod helper; + +use crate::{prelude::*, Holiday, NaiveDateExt, Result, Year}; +use helper::build_year; + +use chrono::NaiveDate; +use std::collections::BTreeMap; +use std::collections::HashMap; + +#[cfg(feature = "AO")] +pub mod ao; + +#[cfg(feature = "AR")] +pub mod ar; + +#[cfg(feature = "AM")] +pub mod am; + +#[cfg(feature = "AW")] +pub mod aw; + +#[cfg(feature = "AU")] +pub mod au; + +#[cfg(feature = "AT")] +pub mod at; + +#[cfg(feature = "AZ")] +pub mod az; + +#[cfg(feature = "BD")] +pub mod bd; + +#[cfg(feature = "BY")] +pub mod by; + +#[cfg(feature = "BE")] +pub mod be; + +#[cfg(feature = "BO")] +pub mod bo; + +#[cfg(feature = "BA")] +pub mod ba; + +#[cfg(feature = "BW")] +pub mod bw; + +#[cfg(feature = "BR")] +pub mod br; + +#[cfg(feature = "BG")] +pub mod bg; + +#[cfg(feature = "BI")] +pub mod bi; + +#[cfg(feature = "CA")] +pub mod ca; + +#[cfg(feature = "CL")] +pub mod cl; + +#[cfg(feature = "CN")] +pub mod cn; + +#[cfg(feature = "CO")] +pub mod co; + +#[cfg(feature = "HR")] +pub mod hr; + +#[cfg(feature = "CU")] +pub mod cu; + +#[cfg(feature = "CW")] +pub mod cw; + +#[cfg(feature = "CY")] +pub mod cy; + +#[cfg(feature = "CZ")] +pub mod cz; + +#[cfg(feature = "DK")] +pub mod dk; + +#[cfg(feature = "DJ")] +pub mod dj; + +#[cfg(feature = "DO")] +pub mod r#do; + +#[cfg(feature = "EG")] +pub mod eg; + +#[cfg(feature = "EE")] +pub mod ee; + +#[cfg(feature = "ET")] +pub mod et; + +#[cfg(feature = "FI")] +pub mod fi; + +#[cfg(feature = "FR")] +pub mod fr; + +#[cfg(feature = "GE")] +pub mod ge; + +#[cfg(feature = "DE")] +pub mod de; + +#[cfg(feature = "GR")] +pub mod gr; + +#[cfg(feature = "HN")] +pub mod hn; + +#[cfg(feature = "HK")] +pub mod hk; + +#[cfg(feature = "HU")] +pub mod hu; + +#[cfg(feature = "IS")] +pub mod is; + +#[cfg(feature = "IN")] +pub mod r#in; + +#[cfg(feature = "ID")] +pub mod id; + +#[cfg(feature = "IE")] +pub mod ie; + +#[cfg(feature = "IM")] +pub mod im; + +#[cfg(feature = "IL")] +pub mod il; + +#[cfg(feature = "IT")] +pub mod it; + +#[cfg(feature = "JM")] +pub mod jm; + +#[cfg(feature = "JP")] +pub mod jp; + +#[cfg(feature = "KZ")] +pub mod kz; + +#[cfg(feature = "KE")] +pub mod ke; + +#[cfg(feature = "LV")] +pub mod lv; + +#[cfg(feature = "LS")] +pub mod ls; + +#[cfg(feature = "LI")] +pub mod li; + +#[cfg(feature = "LT")] +pub mod lt; + +#[cfg(feature = "LU")] +pub mod lu; + +#[cfg(feature = "MG")] +pub mod mg; + +#[cfg(feature = "MY")] +pub mod my; + +#[cfg(feature = "MW")] +pub mod mw; + +#[cfg(feature = "MT")] +pub mod mt; + +#[cfg(feature = "MX")] +pub mod mx; + +#[cfg(feature = "MD")] +pub mod md; + +#[cfg(feature = "MA")] +pub mod ma; + +#[cfg(feature = "MZ")] +pub mod mz; + +#[cfg(feature = "NL")] +pub mod nl; + +#[cfg(feature = "NA")] +pub mod na; + +#[cfg(feature = "NZ")] +pub mod nz; + +#[cfg(feature = "NI")] +pub mod ni; + +#[cfg(feature = "NG")] +pub mod ng; + +#[cfg(feature = "MK")] +pub mod mk; + +#[cfg(feature = "NO")] +pub mod no; + +#[cfg(feature = "PK")] +pub mod pk; + +#[cfg(feature = "PY")] +pub mod py; + +#[cfg(feature = "PE")] +pub mod pe; + +#[cfg(feature = "PL")] +pub mod pl; + +#[cfg(feature = "PT")] +pub mod pt; + +#[cfg(feature = "RO")] +pub mod ro; + +#[cfg(feature = "RU")] +pub mod ru; + +#[cfg(feature = "SA")] +pub mod sa; + +#[cfg(feature = "RS")] +pub mod rs; + +#[cfg(feature = "SG")] +pub mod sg; + +#[cfg(feature = "SK")] +pub mod sk; + +#[cfg(feature = "SI")] +pub mod si; + +#[cfg(feature = "ZA")] +pub mod za; + +#[cfg(feature = "KR")] +pub mod kr; + +#[cfg(feature = "ES")] +pub mod es; + +#[cfg(feature = "SZ")] +pub mod sz; + +#[cfg(feature = "SE")] +pub mod se; + +#[cfg(feature = "CH")] +pub mod ch; + +#[cfg(feature = "TW")] +pub mod tw; + +#[cfg(feature = "TR")] +pub mod tr; + +#[cfg(feature = "TN")] +pub mod tn; + +#[cfg(feature = "UA")] +pub mod ua; + +#[cfg(feature = "AE")] +pub mod ae; + +#[cfg(feature = "GB")] +pub mod gb; + +#[cfg(feature = "US")] +pub mod us; + +#[cfg(feature = "UY")] +pub mod uy; + +#[cfg(feature = "UZ")] +pub mod uz; + +#[cfg(feature = "VE")] +pub mod ve; + +#[cfg(feature = "VN")] +pub mod vn; + +#[cfg(feature = "ZM")] +pub mod zm; + +#[cfg(feature = "ZW")] +pub mod zw; diff --git a/src/data/mt.rs b/src/data/mt.rs new file mode 100644 index 0000000..ab6660c --- /dev/null +++ b/src/data/mt.rs @@ -0,0 +1,1221 @@ +//! Malta +use super::*; + +/// Generate holiday map for Malta. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2000, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2000, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2000, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2000, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2000, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2000, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2000, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2001, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2001, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2001, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2001, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2001, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2001, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2001, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2002, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2002, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2002, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2002, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2002, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2002, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2003, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2003, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2003, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2003, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2003, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2003, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2003, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2004, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2004, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2004, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2004, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2004, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2004, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2004, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2005, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2005, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2005, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2005, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2005, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2005, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2006, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2006, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2006, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2006, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2006, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2006, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2006, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2007, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2007, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2007, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2007, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2007, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2007, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2008, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2008, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2008, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2008, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2008, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2008, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2008, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2009, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2009, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2009, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2009, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2009, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2009, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2010, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2010, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2010, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2010, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2010, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2010, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2010, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2011, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2011, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2011, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2011, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2011, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2011, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2011, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2012, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2012, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2012, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2012, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2012, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2012, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2013, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2013, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2013, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2013, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2013, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2013, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2014, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2014, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2014, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2014, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2014, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2014, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2014, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2015, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2015, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2015, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2015, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2015, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2015, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2015, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2016, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2016, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2016, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2016, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2016, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2016, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2016, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2017, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2017, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2017, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2017, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2017, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2017, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2017, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2018, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2018, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2018, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2018, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2018, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2018, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2019, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2019, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2019, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2019, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2019, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2019, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2019, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2020, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2020, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2020, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2020, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2020, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2020, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2020, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2021, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2021, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2021, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2021, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2021, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2021, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2021, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2022, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2022, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2022, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2022, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2022, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2022, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2022, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2023, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2023, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2023, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2023, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2023, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2023, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2024, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2024, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2024, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2024, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2024, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2024, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2025, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2025, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2025, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2025, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2025, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2025, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2025, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2026, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2026, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2026, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2026, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2026, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2026, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2026, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2027, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2027, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2027, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2027, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2027, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2027, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2027, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2028, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2028, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2028, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2028, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2028, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2028, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2028, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2029, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2029, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2029, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2029, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2029, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2029, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "L-Ewwel tas-Sena"), + ( + NaiveDate::from_ymd_res(2030, 2, 10)?, + "Il-Festa tan-Nawfraġju ta' San Pawl", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 19)?, + "Il-Festa ta' San Ġużepp", + ), + (NaiveDate::from_ymd_res(2030, 3, 31)?, "Jum il-Ħelsien"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Il-Ġimgħa l-Kbira"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Jum il-Ħaddiem"), + (NaiveDate::from_ymd_res(2030, 6, 7)?, "Sette Giugno"), + ( + NaiveDate::from_ymd_res(2030, 6, 29)?, + "Il-Festa ta' San Pietru u San Pawl", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Il-Festa ta' Santa Marija", + ), + (NaiveDate::from_ymd_res(2030, 9, 8)?, "Jum il-Vitorja"), + (NaiveDate::from_ymd_res(2030, 9, 21)?, "Jum l-Indipendenza"), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "Il-Festa tal-Immakulata Kunċizzjoni", + ), + (NaiveDate::from_ymd_res(2030, 12, 13)?, "Jum ir-Repubblika"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Il-Milied"), + ], + &mut map, + Country::MT, + "Malta", + ); + + Ok(map) +} diff --git a/src/data/mw.rs b/src/data/mw.rs new file mode 100644 index 0000000..f7c23cf --- /dev/null +++ b/src/data/mw.rs @@ -0,0 +1,979 @@ +//! Malawi +use super::*; + +/// Generate holiday map for Malawi. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 17)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2000, 5, 15)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2000, 10, 16)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2001, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2001, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2002, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2002, 3, 4)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2002, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2002, 7, 8)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2003, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2003, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2003, 7, 7)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2003, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2004, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2004, 5, 3)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2004, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2004, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 16)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2005, 10, 17)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 16)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2006, 5, 15)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 16)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2007, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2007, 3, 5)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2007, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2008, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2008, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2008, 7, 7)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2008, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2009, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2009, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2009, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2010, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2010, 5, 3)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2010, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2010, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 16)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2011, 10, 17)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 16)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2012, 3, 5)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2012, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2013, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2013, 3, 4)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2013, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2013, 7, 8)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2014, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2014, 7, 7)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2014, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2015, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2015, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2015, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2016, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 16)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 17)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 16)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2017, 5, 15)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 16)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2018, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2018, 3, 5)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2018, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2019, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2019, 3, 4)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2019, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2019, 7, 8)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2019, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2020, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2020, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2020, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2021, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2021, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2021, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 16)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 17)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 16)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2023, 5, 15)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 16)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2024, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2024, 3, 4)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2024, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2024, 7, 8)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2025, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2025, 7, 7)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2026, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2026, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2027, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2027, 5, 3)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2027, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2027, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 1, 15)?, "John Chilembwe Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 17)?, + "John Chilembwe Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 3, 3)?, "Martyrs Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 5, 14)?, "Kamuzu Day"), + ( + NaiveDate::from_ymd_res(2028, 5, 15)?, + "Kamuzu Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 10, 15)?, "Mother's Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 16)?, + "Mother's Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2029, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2029, 3, 5)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2029, 7, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 1, 15)?, "John Chilembwe Day"), + (NaiveDate::from_ymd_res(2030, 3, 3)?, "Martyrs Day"), + ( + NaiveDate::from_ymd_res(2030, 3, 4)?, + "Martyrs Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 5, 14)?, "Kamuzu Day"), + (NaiveDate::from_ymd_res(2030, 7, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2030, 7, 8)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 10, 15)?, "Mother's Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::MW, + "Malawi", + ); + + Ok(map) +} diff --git a/src/data/mx.rs b/src/data/mx.rs new file mode 100644 index 0000000..8791f33 --- /dev/null +++ b/src/data/mx.rs @@ -0,0 +1,935 @@ +//! Mexico +use super::*; + +/// Generate holiday map for Mexico. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2000, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2000, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 20)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 1)?, + "Transmisión del Poder Ejecutivo Federal", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2001, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2001, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2002, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2002, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2003, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2003, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2004, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2004, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2005, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2006, 2, 6)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2006, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 20)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 1)?, + "Transmisión del Poder Ejecutivo Federal", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2007, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 19)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2007, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 19)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2008, 2, 4)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 17)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2008, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 17)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2009, 2, 2)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 16)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2009, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 16)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2010, 2, 1)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 15)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2010, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 15)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2011, 2, 7)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2011, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 21)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2012, 2, 6)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 19)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 1)?, + "Transmisión del Poder Ejecutivo Federal", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2013, 2, 4)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 18)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2013, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 18)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2014, 2, 3)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 17)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 17)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2015, 2, 2)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 16)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2015, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 16)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2016, 2, 1)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2016, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 21)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2017, 2, 6)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 20)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2017, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2018, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 19)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2018, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 1)?, + "Transmisión del Poder Ejecutivo Federal", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2019, 2, 4)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 18)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2019, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 18)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2020, 2, 3)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 16)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2020, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 16)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2021, 2, 1)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 15)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2021, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 15)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2022, 2, 7)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 21)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2022, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 21)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2023, 2, 6)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 20)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2023, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2024, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 18)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2024, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 18)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 1)?, + "Transmisión del Poder Ejecutivo Federal", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2025, 2, 3)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 17)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2025, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 17)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2026, 2, 2)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 16)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2026, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 16)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2027, 2, 1)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 15)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2027, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 15)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2028, 2, 7)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 20)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2028, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 20)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2029, 2, 5)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 19)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2029, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 19)?, + "Día de la Revolución", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Día de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 18)?, + "Natalicio de Benito Juárez", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2030, 9, 16)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 18)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 1)?, + "Transmisión del Poder Ejecutivo Federal", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ], + &mut map, + Country::MX, + "Mexico", + ); + + Ok(map) +} diff --git a/src/data/my.rs b/src/data/my.rs new file mode 100644 index 0000000..3684812 --- /dev/null +++ b/src/data/my.rs @@ -0,0 +1,1371 @@ +//! Malaysia +use super::*; + +/// Generate holiday map for Malaysia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 2, 5)?, + "Tahun Baharu Cina (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 6)?, + "Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 18)?, + "Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2000, 6, 3)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2000, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "Awal Muharam (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "Hari Keputeraan Nabi Muhammad S.A.W. (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Hari Raya Puasa (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Hari Raya Puasa (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Hari Raya Qurban (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "Cuti Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 7)?, + "Cuti Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 24)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2001, 1, 25)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2001, 5, 7)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2001, 6, 2)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2001, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2001, 3, 26)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2001, 12, 17)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2001, 12, 18)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2001, 3, 6)?, "Hari Raya Qurban"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2002, 2, 13)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2002, 5, 27)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2002, 6, 1)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2002, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2002, 3, 15)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2002, 12, 6)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2002, 12, 7)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2002, 2, 23)?, "Hari Raya Qurban"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 2, 1)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2003, 2, 2)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2003, 5, 15)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2003, 6, 7)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2003, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2003, 3, 5)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2003, 5, 14)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2003, 11, 26)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2003, 11, 27)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2003, 2, 3)?, + "Cuti Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2003, 9, 1)?, "Cuti Hari Kebangsaan"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 22)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2004, 1, 23)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2004, 5, 3)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2004, 6, 5)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2004, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2004, 2, 22)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2004, 5, 2)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2004, 2, 2)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2004, 5, 4)?, + "Cuti Hari Keputeraan Nabi Muhammad S.A.W.", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 16)?, + "Cuti Hari Raya Puasa", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 2, 9)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "Awal Muharam; Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2005, 5, 22)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2005, 6, 4)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2005, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "Hari Raya Qurban"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "Cuti Hari Pekerja"), + (NaiveDate::from_ymd_res(2005, 5, 23)?, "Cuti Hari Wesak"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Cuti Hari Krismas"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 29)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2006, 1, 30)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2006, 5, 12)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2006, 6, 3)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2006, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2006, 1, 31)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2006, 4, 11)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2006, 10, 25)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Hari Raya Qurban"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2006, 2, 1)?, + "Cuti Tahun Baharu Cina", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 2, 18)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Hari Pekerja; Hari Wesak", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 2)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2007, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2007, 1, 20)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2007, 2, 20)?, + "Cuti Tahun Baharu Cina", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "Cuti Hari Raya Puasa (Hari Kedua)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 2, 7)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2008, 2, 8)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2008, 5, 19)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2008, 6, 7)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2008, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2008, 1, 10)?, "Awal Muharam"), + (NaiveDate::from_ymd_res(2008, 12, 29)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2008, 12, 9)?, "Hari Raya Qurban"), + (NaiveDate::from_ymd_res(2008, 9, 1)?, "Cuti Hari Kebangsaan"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 26)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2009, 1, 27)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2009, 5, 9)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2009, 6, 6)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2009, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2009, 12, 18)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2009, 11, 28)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2009, 9, 22)?, + "Cuti Hari Raya Puasa", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 2, 14)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2010, 5, 28)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2010, 6, 5)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2010, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2010, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2010, 12, 8)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2010, 2, 16)?, + "Cuti Tahun Baharu Cina", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 2, 3)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2011, 2, 4)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2011, 5, 17)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2011, 6, 4)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "Hari Kebangsaan; Hari Raya Puasa", + ), + (NaiveDate::from_ymd_res(2011, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2011, 11, 27)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2011, 2, 16)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 1)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2011, 11, 7)?, "Hari Raya Qurban"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "Cuti Hari Pekerja"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Cuti Hari Krismas"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 23)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2012, 1, 24)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2012, 5, 5)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2012, 6, 2)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2012, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2012, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2012, 11, 15)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2012, 2, 5)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2012, 2, 6)?, + "Cuti Hari Keputeraan Nabi Muhammad S.A.W.", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 21)?, + "Cuti Hari Raya Puasa", + ), + (NaiveDate::from_ymd_res(2012, 9, 17)?, "Cuti Hari Malaysia"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 2, 10)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2013, 2, 11)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2013, 5, 24)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2013, 6, 1)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2013, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2013, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2013, 11, 5)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2013, 2, 12)?, + "Cuti Tahun Baharu Cina", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 31)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2014, 2, 1)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2014, 5, 13)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2014, 6, 7)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2014, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2014, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2014, 10, 25)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2014, 1, 14)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2014, 10, 5)?, "Hari Raya Qurban"), + (NaiveDate::from_ymd_res(2014, 9, 1)?, "Cuti Hari Kebangsaan"), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "Cuti Hari Raya Qurban", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 2, 19)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2015, 2, 20)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2015, 5, 3)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2015, 6, 6)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2015, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2015, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2015, 10, 14)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2015, 1, 3)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 24)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Hari Raya Qurban"), + (NaiveDate::from_ymd_res(2015, 5, 4)?, "Cuti Hari Wesak"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2016, 2, 9)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2016, 5, 21)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2016, 6, 4)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2016, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2016, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2016, 10, 2)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2016, 12, 12)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "Hari Raya Qurban"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "Cuti Hari Pekerja"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Cuti Hari Krismas"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 28)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2017, 1, 29)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2017, 5, 10)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2017, 9, 9)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2017, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2017, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2017, 9, 22)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2017, 12, 1)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Hari Pertabalan Yang di-Pertuan Agong ke-15", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 4)?, + "Cuti tambahan sempena memperingati SAT 2017", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 30)?, + "Cuti Tahun Baharu Cina (Hari Kedua)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 27)?, + "Cuti Hari Raya Puasa", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 2, 16)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2018, 2, 17)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2018, 5, 29)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2018, 9, 9)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2018, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2018, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2018, 9, 11)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2018, 11, 20)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2018, 5, 9)?, + "Cuti Peristiwa (pilihan raya umum)", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 10)?, + "Cuti Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2018, 9, 17)?, "Cuti Hari Malaysia"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 2, 5)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2019, 2, 6)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2019, 5, 19)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2019, 9, 9)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2019, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2019, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2019, 9, 1)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2019, 6, 6)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2019, 7, 30)?, + "Hari Pertabalan Yang di-Pertuan Agong ke-16", + ), + (NaiveDate::from_ymd_res(2019, 5, 20)?, "Cuti Hari Wesak"), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "Cuti Hari Raya Qurban", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 25)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2020, 1, 26)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2020, 5, 7)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2020, 6, 8)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2020, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2020, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2020, 8, 20)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2020, 10, 29)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2020, 1, 27)?, + "Cuti Tahun Baharu Cina (Hari Kedua)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 26)?, + "Cuti Hari Raya Puasa", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2021, 2, 13)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2021, 5, 26)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2021, 6, 7)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2021, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2021, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2021, 8, 10)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2021, 10, 19)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "Hari Raya Qurban"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 2, 1)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2022, 2, 2)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2022, 5, 15)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2022, 6, 6)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2022, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2022, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2022, 7, 30)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2022, 11, 18)?, + "Cuti Peristiwa (pilihan raya umum)", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 19)?, + "Cuti Peristiwa (pilihan raya umum)", + ), + (NaiveDate::from_ymd_res(2022, 11, 28)?, "Cuti Peristiwa"), + (NaiveDate::from_ymd_res(2022, 5, 4)?, "Cuti Hari Pekerja"), + (NaiveDate::from_ymd_res(2022, 5, 16)?, "Cuti Hari Wesak"), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "Cuti Hari Raya Qurban", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Cuti Hari Krismas"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 22)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2023, 1, 23)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2023, 5, 4)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2023, 6, 5)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2023, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2023, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2023, 7, 19)?, "Awal Muharam"), + ( + NaiveDate::from_ymd_res(2023, 9, 28)?, + "Hari Keputeraan Nabi Muhammad S.A.W.", + ), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2023, 4, 23)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2023, 4, 21)?, + "Hari Raya Puasa (pergantian hari)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 24)?, + "Cuti Tahun Baharu Cina", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Cuti Hari Raya Puasa (Hari Kedua)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 2, 10)?, "Tahun Baharu Cina"), + ( + NaiveDate::from_ymd_res(2024, 2, 11)?, + "Tahun Baharu Cina (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2024, 5, 22)?, "Hari Wesak"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2024, 6, 3)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2024, 8, 31)?, "Hari Kebangsaan"), + ( + NaiveDate::from_ymd_res(2024, 9, 16)?, + "Hari Keputeraan Nabi Muhammad S.A.W.; Hari Malaysia", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Hari Krismas"), + (NaiveDate::from_ymd_res(2024, 7, 7)?, "Awal Muharam"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Hari Raya Puasa"), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "Hari Raya Puasa (Hari Kedua)", + ), + (NaiveDate::from_ymd_res(2024, 6, 17)?, "Hari Raya Qurban"), + ( + NaiveDate::from_ymd_res(2024, 2, 12)?, + "Cuti Tahun Baharu Cina (Hari Kedua)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 29)?, + "Tahun Baharu Cina (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 30)?, + "Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 11)?, + "Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2025, 6, 2)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2025, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2025, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "Awal Muharam (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "Hari Keputeraan Nabi Muhammad S.A.W. (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Hari Raya Puasa (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Hari Raya Qurban (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "Cuti Hari Raya Puasa (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 12)?, + "Cuti Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2025, 9, 1)?, "Cuti Hari Kebangsaan"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 2, 17)?, + "Tahun Baharu Cina (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 18)?, + "Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Hari Pekerja; Hari Wesak (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 1)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2026, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2026, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2026, 6, 16)?, + "Awal Muharam (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "Hari Keputeraan Nabi Muhammad S.A.W. (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Hari Raya Puasa (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Hari Raya Qurban (anggaran)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 2, 6)?, + "Tahun Baharu Cina (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 7)?, + "Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 20)?, + "Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2027, 6, 7)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2027, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2027, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "Awal Muharam (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "Hari Keputeraan Nabi Muhammad S.A.W. (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Hari Raya Puasa (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Hari Raya Qurban (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "Cuti Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Cuti Hari Raya Qurban (anggaran)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 26)?, + "Tahun Baharu Cina (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 27)?, + "Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2028, 6, 5)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2028, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2028, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Awal Muharam (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "Hari Keputeraan Nabi Muhammad S.A.W. (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Hari Raya Puasa (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Hari Raya Qurban (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Cuti Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 2, 13)?, + "Tahun Baharu Cina (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Hari Raya Puasa (anggaran); Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 27)?, + "Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2029, 6, 4)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2029, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2029, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "Awal Muharam (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "Hari Keputeraan Nabi Muhammad S.A.W. (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Hari Raya Qurban (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 28)?, + "Cuti Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2029, 9, 17)?, "Cuti Hari Malaysia"), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 2, 3)?, + "Tahun Baharu Cina (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Hari Raya Puasa (anggaran); Tahun Baharu Cina (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 16)?, + "Hari Wesak (anggaran)", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Hari Pekerja"), + ( + NaiveDate::from_ymd_res(2030, 6, 3)?, + "Hari Keputeraan Rasmi Seri Paduka Baginda Yang di-Pertuan Agong", + ), + (NaiveDate::from_ymd_res(2030, 8, 31)?, "Hari Kebangsaan"), + (NaiveDate::from_ymd_res(2030, 9, 16)?, "Hari Malaysia"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Hari Krismas"), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "Awal Muharam (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "Hari Keputeraan Nabi Muhammad S.A.W. (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Hari Raya Puasa (Hari Kedua) (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Hari Raya Qurban (anggaran)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "Cuti Tahun Baharu Cina (anggaran)", + ), + ], + &mut map, + Country::MY, + "Malaysia", + ); + + Ok(map) +} diff --git a/src/data/mz.rs b/src/data/mz.rs new file mode 100644 index 0000000..6947640 --- /dev/null +++ b/src/data/mz.rs @@ -0,0 +1,1408 @@ +//! Mozambique +use super::*; + +/// Generate holiday map for Mozambique. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 25)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 26)?, + "Dia da Independência Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2000, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2000, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2001, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2001, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2001, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 4)?, + "Dia dos Heróis Moçambicanos (ponte)", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 8)?, + "Dia da Mulher Moçambicana (ponte)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2002, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2002, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2003, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2003, 9, 8)?, + "Dia da Vitória (ponte)", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2004, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2004, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Dia Internacional dos Trabalhadores (ponte)", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2005, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2005, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 26)?, + "Dia das Forças Armadas de Libertação Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Dia da Família"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Dia da Família (ponte)", + ), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "Dia da Fraternidade universal (ponte)", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 25)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 26)?, + "Dia da Independência Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2006, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2006, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2007, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2007, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 4)?, + "Dia dos Heróis Moçambicanos (ponte)", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2008, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2008, 9, 8)?, + "Dia da Vitória (ponte)", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2009, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2009, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 5)?, + "Dia da Paz e Reconciliação (ponte)", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2010, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2010, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Dia Internacional dos Trabalhadores (ponte)", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2011, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2011, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 26)?, + "Dia das Forças Armadas de Libertação Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Dia da Família"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Dia da Família (ponte)", + ), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "Dia da Fraternidade universal (ponte)", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2012, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2012, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 4)?, + "Dia dos Heróis Moçambicanos (ponte)", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 8)?, + "Dia da Mulher Moçambicana (ponte)", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2013, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2013, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2014, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2014, 9, 8)?, + "Dia da Vitória (ponte)", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2015, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2015, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 5)?, + "Dia da Paz e Reconciliação (ponte)", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Dia Internacional dos Trabalhadores (ponte)", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2016, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2016, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 26)?, + "Dia das Forças Armadas de Libertação Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Dia da Família"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Dia da Família (ponte)", + ), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "Dia da Fraternidade universal (ponte)", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 25)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Dia da Independência Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2017, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2017, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2018, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2018, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 4)?, + "Dia dos Heróis Moçambicanos (ponte)", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 8)?, + "Dia da Mulher Moçambicana (ponte)", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2019, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2019, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2020, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2020, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2020, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 5)?, + "Dia da Paz e Reconciliação (ponte)", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2021, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2021, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Dia Internacional dos Trabalhadores (ponte)", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2022, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2022, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 26)?, + "Dia das Forças Armadas de Libertação Nacional (ponte)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Dia da Família"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Dia da Família (ponte)", + ), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "Dia da Fraternidade universal (ponte)", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 25)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 26)?, + "Dia da Independência Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2023, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2023, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 8)?, + "Dia da Mulher Moçambicana (ponte)", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2024, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2024, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2025, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2025, 9, 8)?, + "Dia da Vitória (ponte)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2026, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2026, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 5)?, + "Dia da Paz e Reconciliação (ponte)", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2027, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2027, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 25)?, + "Dia da Independência Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 26)?, + "Dia da Independência Nacional (ponte)", + ), + (NaiveDate::from_ymd_res(2028, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2028, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2029, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2029, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 1)?, + "Dia da Fraternidade universal", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 3)?, + "Dia dos Heróis Moçambicanos", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Dia dos Heróis Moçambicanos (ponte)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 7)?, + "Dia da Mulher Moçambicana", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 8)?, + "Dia da Mulher Moçambicana (ponte)", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Dia Internacional dos Trabalhadores", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 25)?, + "Dia da Independência Nacional", + ), + (NaiveDate::from_ymd_res(2030, 9, 7)?, "Dia da Vitória"), + ( + NaiveDate::from_ymd_res(2030, 9, 25)?, + "Dia das Forças Armadas de Libertação Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 4)?, + "Dia da Paz e Reconciliação", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Dia da Família"), + ], + &mut map, + Country::MZ, + "Mozambique", + ); + + Ok(map) +} diff --git a/src/data/na.rs b/src/data/na.rs new file mode 100644 index 0000000..2f943fd --- /dev/null +++ b/src/data/na.rs @@ -0,0 +1,934 @@ +//! Namibia +use super::*; + +/// Generate holiday map for Namibia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2000, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2000, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2000, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2000, 9, 10)?, + "International Human Rights Day", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 11)?, + "International Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Family Day"), + (NaiveDate::from_ymd_res(2000, 1, 3)?, "Y2K changeover"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2001, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2001, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2001, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2001, 8, 27)?, + "Heroes' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 10)?, + "International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2002, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2002, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2002, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2002, 9, 10)?, + "International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2003, 5, 4)?, "Cassinga Day"), + ( + NaiveDate::from_ymd_res(2003, 5, 5)?, + "Cassinga Day (observed)", + ), + (NaiveDate::from_ymd_res(2003, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2003, 5, 26)?, + "Africa Day (observed)", + ), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2003, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2003, 9, 10)?, + "International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 3, 21)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 3, 22)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2004, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2004, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2004, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2004, 9, 10)?, + "International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Family Day (observed)", + ), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2005, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2005, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2005, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2006, 5, 4)?, "Cassinga Day"), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Africa Day; Ascension Day", + ), + (NaiveDate::from_ymd_res(2006, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2006, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 11)?, + "Day of the Namibian Women and International Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2007, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2007, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2007, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2007, 8, 27)?, + "Heroes' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2008, 3, 21)?, + "Good Friday; Independence Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Ascension Day; Workers' Day", + ), + (NaiveDate::from_ymd_res(2008, 5, 4)?, "Cassinga Day"), + ( + NaiveDate::from_ymd_res(2008, 5, 5)?, + "Cassinga Day (observed)", + ), + (NaiveDate::from_ymd_res(2008, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2008, 5, 26)?, + "Africa Day (observed)", + ), + (NaiveDate::from_ymd_res(2008, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2008, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2009, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2009, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2009, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 3, 21)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 3, 22)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2010, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2010, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2010, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2010, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Family Day (observed)", + ), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2011, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2011, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2011, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2012, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2012, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2012, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2012, 8, 27)?, + "Heroes' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2013, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2013, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2013, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2013, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2014, 5, 4)?, "Cassinga Day"), + ( + NaiveDate::from_ymd_res(2014, 5, 5)?, + "Cassinga Day (observed)", + ), + (NaiveDate::from_ymd_res(2014, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2014, 5, 26)?, + "Africa Day (observed)", + ), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2014, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2014, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2015, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2015, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2015, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2016, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2016, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2016, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2017, 5, 4)?, "Cassinga Day"), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Africa Day; Ascension Day", + ), + (NaiveDate::from_ymd_res(2017, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2017, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 11)?, + "Day of the Namibian Women and International Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2018, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2018, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2018, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2018, 8, 27)?, + "Heroes' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2019, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2019, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2019, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2019, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2020, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2020, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2020, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 3, 21)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 3, 22)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2021, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2021, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2021, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2021, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Family Day (observed)", + ), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2022, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2022, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2022, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2023, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2023, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2023, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2023, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 11)?, + "Day of the Namibian Women and International Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2024, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2024, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2024, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2024, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2025, 5, 4)?, "Cassinga Day"), + ( + NaiveDate::from_ymd_res(2025, 5, 5)?, + "Cassinga Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2025, 5, 26)?, + "Africa Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2025, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2025, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2026, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2026, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2026, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 3, 22)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2027, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2027, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2027, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2027, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Family Day (observed)", + ), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2028, 5, 4)?, "Cassinga Day"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Africa Day; Ascension Day", + ), + (NaiveDate::from_ymd_res(2028, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2028, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 11)?, + "Day of the Namibian Women and International Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2029, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2029, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2029, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2029, 8, 27)?, + "Heroes' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 3, 21)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2030, 5, 4)?, "Cassinga Day"), + (NaiveDate::from_ymd_res(2030, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2030, 8, 26)?, "Heroes' Day"), + ( + NaiveDate::from_ymd_res(2030, 9, 10)?, + "Day of the Namibian Women and International Human Rights Day", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Family Day"), + ], + &mut map, + Country::NA, + "Namibia", + ); + + Ok(map) +} diff --git a/src/data/ng.rs b/src/data/ng.rs new file mode 100644 index 0000000..0627379 --- /dev/null +++ b/src/data/ng.rs @@ -0,0 +1,1419 @@ +//! Nigeria +use super::*; + +/// Generate holiday map for Nigeria. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2000, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2000, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2001, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2001, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2002, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2002, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 22)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2003, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 11)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Eid-el-Mawlid (estimated); Workers' Day", + ), + (NaiveDate::from_ymd_res(2004, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2004, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 1)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2005, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2005, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2005, 11, 3)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 21)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 22)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2006, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2006, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 23)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 10)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 10)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Eid-el-Kabir Holiday (estimated); New Year's Day", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2007, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2007, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2007, 10, 13)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 20)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 21)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2008, 5, 29)?, "Democracy Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "Eid-el-Fitr (estimated); Independence Day", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 9)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2009, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2009, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2009, 9, 20)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 28)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2010, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2010, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 9, 10)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 16)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2011, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2011, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2012, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2012, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2012, 8, 19)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 26)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 27)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 4)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2013, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2013, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2013, 8, 8)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 15)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 16)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2014, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2014, 7, 28)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 4)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 5)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 13)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2015, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2015, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2015, 7, 17)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 23)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 24)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 3)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 23)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2016, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2016, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2016, 7, 6)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 11)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 11)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Workers' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 30)?, + "Democracy Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 13)?, + "Eid-el-Kabir (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 3)?, + "Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 12)?, + "Eid-el-Mawlid (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2017, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2017, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2017, 6, 25)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 1)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 2)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 30)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 27)?, + "Eid-el-Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 4)?, + "Eid-el-Kabir Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 2)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2018, 5, 29)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2018, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2018, 6, 15)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 21)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 22)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 20)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 18)?, + "Eid-el-Fitr Holiday (estimated) (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2019, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2019, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2019, 6, 4)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 5)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 11)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 13)?, + "Eid-el-Kabir (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 11)?, + "Eid-el-Mawlid (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 22)?, + "Public Holiday for Elections", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 29)?, + "Presidential Inauguration Day", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2020, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2020, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2020, 5, 24)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 31)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 1)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 29)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 26)?, + "Eid-el-Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 3)?, + "Eid-el-Kabir Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2021, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2021, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "Workers' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 14)?, + "Democracy Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2022, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2022, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 9)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 10)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 8)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 4)?, + "Workers' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 13)?, + "Democracy Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "Eid-el-Kabir (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 12)?, + "Eid-el-Kabir Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 3)?, + "Independence Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Eid-el-Mawlid (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2023, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2023, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2023, 4, 21)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 22)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 28)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 27)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Eid-el-Fitr Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 2)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2024, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2024, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2024, 4, 10)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "Eid-el-Kabir (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 16)?, + "Eid-el-Mawlid (estimated) (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2025, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2025, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "Eid-el-Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 9)?, + "Eid-el-Kabir Holiday (estimated) (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2026, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2026, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 23)?, + "Eid-el-Fitr Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2027, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2027, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 3)?, + "Workers' Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 18)?, + "Eid-el-Kabir (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 14)?, + "Democracy Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 16)?, + "Eid-el-Mawlid (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2028, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2028, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Eid-el-Fitr (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 29)?, + "Eid-el-Fitr Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 8)?, + "Eid-el-Kabir Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 2)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2029, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2029, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "Eid-el-Mawlid (estimated)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2030, 6, 12)?, "Democracy Day"), + (NaiveDate::from_ymd_res(2030, 10, 1)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Eid-el-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Eid-el-Fitr Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Eid-el-Kabir (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "Eid-el-Kabir Holiday (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "Eid-el-Mawlid (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "Eid-el-Kabir (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 16)?, + "Eid-el-Kabir Holiday (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 15)?, + "Eid-el-Mawlid (estimated) (observed)", + ), + ], + &mut map, + Country::NG, + "Nigeria", + ); + + Ok(map) +} diff --git a/src/data/ni.rs b/src/data/ni.rs new file mode 100644 index 0000000..ab837ac --- /dev/null +++ b/src/data/ni.rs @@ -0,0 +1,1128 @@ +//! Nicaragua +use super::*; + +/// Generate holiday map for Nicaragua. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2000, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2000, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2000, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2001, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2001, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2001, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2002, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2002, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2002, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2003, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2003, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2003, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2004, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2004, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2004, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2005, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2005, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2006, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2006, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2006, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2007, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2007, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2007, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2008, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2008, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2009, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2009, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2009, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2010, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2010, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2010, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2011, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2011, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2011, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2012, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2012, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2013, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2013, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2014, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2014, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2015, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2015, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2015, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2016, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2016, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2016, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2017, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2017, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2017, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2018, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2018, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2018, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2019, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2019, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2019, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2020, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2020, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2020, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2021, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2021, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2021, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2022, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2022, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2022, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2023, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2023, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2023, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2024, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2024, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2024, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2025, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2025, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2025, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2026, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2026, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2026, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2027, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2027, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2027, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2028, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2028, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2028, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2029, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2029, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2029, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2030, 7, 19)?, + "Día de la Revolución", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 14)?, + "Batalla de San Jacinto", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 15)?, + "Día de la Independencia", + ), + (NaiveDate::from_ymd_res(2030, 12, 8)?, "Concepción de María"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ( + NaiveDate::from_ymd_res(2030, 8, 1)?, + "Bajada de Santo Domingo", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 10)?, + "Subida de Santo Domingo", + ), + ], + &mut map, + Country::NI, + "Nicaragua", + ); + + Ok(map) +} diff --git a/src/data/nl.rs b/src/data/nl.rs new file mode 100644 index 0000000..17ab687 --- /dev/null +++ b/src/data/nl.rs @@ -0,0 +1,610 @@ +//! Netherlands +use super::*; + +/// Generate holiday map for Netherlands. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2000, 4, 29)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2000, 5, 5)?, "Bevrijdingsdag"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2001, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2002, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2003, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2004, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2005, 4, 30)?, "Koninginnedag"), + ( + NaiveDate::from_ymd_res(2005, 5, 5)?, + "Bevrijdingsdag; Hemelvaartsdag", + ), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2006, 4, 29)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2007, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2008, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2009, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2010, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2010, 5, 5)?, "Bevrijdingsdag"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2011, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2012, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2013, 4, 30)?, "Koninginnedag"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2014, 4, 26)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2015, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2015, 5, 5)?, "Bevrijdingsdag"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2016, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2017, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2018, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2019, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2020, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2020, 5, 5)?, "Bevrijdingsdag"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2021, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2022, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2023, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2024, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2025, 4, 26)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2025, 5, 5)?, "Bevrijdingsdag"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2026, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2027, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2028, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2029, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nieuwjaarsdag"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Eerste paasdag"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Tweede paasdag"), + (NaiveDate::from_ymd_res(2030, 4, 27)?, "Koningsdag"), + (NaiveDate::from_ymd_res(2030, 5, 5)?, "Bevrijdingsdag"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Hemelvaartsdag"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Eerste Pinksterdag"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Tweede Pinksterdag"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Eerste Kerstdag"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Tweede Kerstdag"), + ], + &mut map, + Country::NL, + "Netherlands", + ); + + Ok(map) +} diff --git a/src/data/no.rs b/src/data/no.rs new file mode 100644 index 0000000..baf5d73 --- /dev/null +++ b/src/data/no.rs @@ -0,0 +1,786 @@ +//! Norway +use super::*; + +/// Generate holiday map for Norway. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Langfredag"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2000, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2000, 6, 1)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Langfredag"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2001, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2001, 5, 24)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Langfredag"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2002, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Langfredag"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2003, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2003, 5, 29)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Langfredag"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2004, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2004, 5, 20)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Langfredag"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2005, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2005, 5, 5)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2005, 5, 16)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Langfredag"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2006, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Langfredag"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Arbeidernes dag"), + ( + NaiveDate::from_ymd_res(2007, 5, 17)?, + "Grunnlovsdag; Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Langfredag"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Andre påskedag"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Arbeidernes dag; Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2008, 5, 17)?, "Grunnlovsdag"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2008, 5, 12)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Langfredag"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2009, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2009, 5, 21)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Langfredag"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2010, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2010, 5, 13)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Langfredag"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2011, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2011, 6, 2)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Langfredag"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Arbeidernes dag"), + ( + NaiveDate::from_ymd_res(2012, 5, 17)?, + "Grunnlovsdag; Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Langfredag"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2013, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2013, 5, 20)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Langfredag"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2014, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2014, 5, 29)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Langfredag"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2015, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2015, 5, 14)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Langfredag"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2016, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2016, 5, 5)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2016, 5, 16)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Langfredag"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2017, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Langfredag"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2018, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2018, 5, 10)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2018, 5, 21)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Langfredag"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2019, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2019, 5, 30)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2019, 6, 10)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Langfredag"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2020, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2020, 5, 21)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Langfredag"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2021, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2021, 5, 24)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Langfredag"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2022, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2022, 5, 26)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Langfredag"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2023, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2023, 5, 18)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Langfredag"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2024, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2024, 5, 20)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Langfredag"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2025, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2025, 5, 29)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Langfredag"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2026, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2026, 5, 14)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Langfredag"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Arbeidernes dag"), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Andre pinsedag; Grunnlovsdag", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 6)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Langfredag"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2028, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Langfredag"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2029, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2029, 5, 10)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2029, 5, 21)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Første nyttårsdag"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Skjærtorsdag"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Langfredag"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Første påskedag"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Andre påskedag"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Arbeidernes dag"), + (NaiveDate::from_ymd_res(2030, 5, 17)?, "Grunnlovsdag"), + ( + NaiveDate::from_ymd_res(2030, 5, 30)?, + "Kristi himmelfartsdag", + ), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Første pinsedag"), + (NaiveDate::from_ymd_res(2030, 6, 10)?, "Andre pinsedag"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Første juledag"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Andre juledag"), + ], + &mut map, + Country::NO, + "Norway", + ); + + Ok(map) +} diff --git a/src/data/nz.rs b/src/data/nz.rs new file mode 100644 index 0000000..82e41d6 --- /dev/null +++ b/src/data/nz.rs @@ -0,0 +1,916 @@ +//! New Zealand +use super::*; + +/// Generate holiday map for New Zealand. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2000, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 6, 5)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2000, 10, 23)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2001, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2001, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2001, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2001, 10, 22)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2002, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2002, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2002, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 6, 3)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2002, 10, 28)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2003, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2003, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 6, 2)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2003, 10, 27)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2004, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2004, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2004, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 6, 7)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2004, 10, 25)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2005, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 6, 6)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2005, 10, 24)?, "Labour Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2006, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2006, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 6, 5)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2007, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2007, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 6, 4)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2007, 10, 22)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2008, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2008, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 6, 2)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2008, 10, 27)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2009, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2009, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2009, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 6, 1)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2009, 10, 26)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2009, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2010, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2010, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 6, 7)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2010, 10, 25)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 2, 6)?, "Waitangi Day"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Anzac Day; Easter Monday", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 6, 6)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2011, 10, 24)?, "Labour Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2012, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2012, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 6, 4)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2012, 10, 22)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2013, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2013, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2013, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 6, 3)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2013, 10, 28)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2014, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2014, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2014, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 6, 2)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2014, 10, 27)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2015, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2015, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2015, 4, 25)?, "Anzac Day"), + ( + NaiveDate::from_ymd_res(2015, 4, 27)?, + "Anzac Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 6, 1)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2015, 10, 26)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2015, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2016, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 2, 6)?, "Waitangi Day"), + ( + NaiveDate::from_ymd_res(2016, 2, 8)?, + "Waitangi Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 6, 6)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2016, 10, 24)?, "Labour Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2017, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2017, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2017, 10, 23)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2018, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2018, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2018, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 6, 4)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2018, 10, 22)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2019, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2019, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2019, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 6, 3)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2019, 10, 28)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2020, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2020, 4, 25)?, "Anzac Day"), + ( + NaiveDate::from_ymd_res(2020, 4, 27)?, + "Anzac Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2020, 10, 26)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2020, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2021, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 2, 6)?, "Waitangi Day"), + ( + NaiveDate::from_ymd_res(2021, 2, 8)?, + "Waitangi Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 4, 25)?, "Anzac Day"), + ( + NaiveDate::from_ymd_res(2021, 4, 26)?, + "Anzac Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 6, 7)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2021, 10, 25)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 2, 6)?, "Waitangi Day"), + ( + NaiveDate::from_ymd_res(2022, 2, 7)?, + "Waitangi Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Queen's Birthday"), + (NaiveDate::from_ymd_res(2022, 6, 24)?, "Matariki"), + (NaiveDate::from_ymd_res(2022, 10, 24)?, "Labour Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2022, 9, 26)?, + "Queen Elizabeth II Memorial Day", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2023, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2023, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 6, 5)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2023, 7, 14)?, "Matariki"), + (NaiveDate::from_ymd_res(2023, 10, 23)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2024, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2024, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2024, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 6, 3)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2024, 6, 28)?, "Matariki"), + (NaiveDate::from_ymd_res(2024, 10, 28)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2025, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2025, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 6, 2)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2025, 6, 20)?, "Matariki"), + (NaiveDate::from_ymd_res(2025, 10, 27)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2026, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2026, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2026, 4, 25)?, "Anzac Day"), + ( + NaiveDate::from_ymd_res(2026, 4, 27)?, + "Anzac Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 6, 1)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2026, 7, 10)?, "Matariki"), + (NaiveDate::from_ymd_res(2026, 10, 26)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 2, 6)?, "Waitangi Day"), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "Waitangi Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 4, 25)?, "Anzac Day"), + ( + NaiveDate::from_ymd_res(2027, 4, 26)?, + "Anzac Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 6, 7)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2027, 6, 25)?, "Matariki"), + (NaiveDate::from_ymd_res(2027, 10, 25)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 28)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 2)?, + "Day after New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 4)?, + "Day after New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 2, 6)?, "Waitangi Day"), + ( + NaiveDate::from_ymd_res(2028, 2, 7)?, + "Waitangi Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2028, 7, 14)?, "Matariki"), + (NaiveDate::from_ymd_res(2028, 10, 23)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2029, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2029, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2029, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 6, 4)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2029, 7, 6)?, "Matariki"), + (NaiveDate::from_ymd_res(2029, 10, 22)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2030, 1, 2)?, + "Day after New Year's Day", + ), + (NaiveDate::from_ymd_res(2030, 2, 6)?, "Waitangi Day"), + (NaiveDate::from_ymd_res(2030, 4, 25)?, "Anzac Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 6, 3)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2030, 6, 21)?, "Matariki"), + (NaiveDate::from_ymd_res(2030, 10, 28)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::NZ, + "New Zealand", + ); + + Ok(map) +} diff --git a/src/data/pe.rs b/src/data/pe.rs new file mode 100644 index 0000000..c6b37ce --- /dev/null +++ b/src/data/pe.rs @@ -0,0 +1,1208 @@ +//! Peru +use super::*; + +/// Generate holiday map for Peru. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2000, 4, 23)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2000, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2000, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2000, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2001, 4, 15)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2001, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2001, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2002, 3, 31)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2002, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2002, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2002, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2003, 4, 20)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2003, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2003, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2003, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2004, 4, 11)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2004, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2004, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2004, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2005, 3, 27)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2005, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2005, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2005, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2006, 4, 16)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2006, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2006, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2006, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2007, 4, 8)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2007, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2007, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2008, 3, 23)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2008, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2008, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2008, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2009, 4, 12)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2009, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2009, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2009, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2010, 4, 4)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2010, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2010, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2010, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2011, 4, 24)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2011, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2011, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2012, 4, 8)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2012, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2012, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2013, 3, 31)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2013, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2013, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2013, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2014, 4, 20)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2014, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2014, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2014, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2015, 4, 5)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2015, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2015, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2015, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2016, 3, 27)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2016, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2016, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2016, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2017, 4, 16)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2017, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2017, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2017, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2018, 4, 1)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2018, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2018, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2019, 4, 21)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2019, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2019, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2019, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2020, 4, 12)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2020, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2020, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2020, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2021, 4, 4)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2021, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2021, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2021, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2022, 4, 17)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2022, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2022, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2022, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2022, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2022, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2023, 4, 9)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2023, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2023, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2023, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2023, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2024, 3, 31)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2024, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2024, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2024, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2024, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2024, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2025, 4, 20)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2025, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2025, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2025, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2025, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2025, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2026, 4, 5)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2026, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2026, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2026, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2026, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2026, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2027, 3, 28)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2027, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2027, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2027, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2027, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2027, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2028, 4, 16)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2028, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2028, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2028, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2028, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2028, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2029, 4, 1)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2029, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2029, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2029, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2029, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2029, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2030, 4, 21)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajo"), + ( + NaiveDate::from_ymd_res(2030, 6, 29)?, + "San Pedro y San Pablo", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 28)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 29)?, + "Día de la Gran Parada Militar", + ), + (NaiveDate::from_ymd_res(2030, 8, 6)?, "Batalla de Junín"), + (NaiveDate::from_ymd_res(2030, 8, 30)?, "Santa Rosa de Lima"), + (NaiveDate::from_ymd_res(2030, 10, 8)?, "Combate de Angamos"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Todos Los Santos"), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "Inmaculada Concepción", + ), + (NaiveDate::from_ymd_res(2030, 12, 9)?, "Batalla de Ayacucho"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad del Señor"), + ], + &mut map, + Country::PE, + "Peru", + ); + + Ok(map) +} diff --git a/src/data/pk.rs b/src/data/pk.rs new file mode 100644 index 0000000..e54bf3e --- /dev/null +++ b/src/data/pk.rs @@ -0,0 +1,1137 @@ +//! Pakistan +use super::*; + +/// Generate holiday map for Pakistan. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2000, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 29)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 18)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2000, 4, 14)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2000, 4, 15)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2001, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 18)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 7)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2001, 4, 3)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2001, 4, 4)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 2, 5)?, + "Kashmir Solidarity Day", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 23)?, + "Ashura (estimated); Pakistan Day", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 7)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 22)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 24)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2002, 3, 24)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2003, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 27)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 11)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 13)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2003, 3, 12)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2003, 3, 13)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2004, 3, 23)?, "Pakistan Day"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Eid Milad-un-Nabi (estimated); Labour Day", + ), + (NaiveDate::from_ymd_res(2004, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2004, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 16)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 1)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 3)?, + "Eid-ul-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2004, 2, 29)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2004, 3, 1)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2005, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2005, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2005, 11, 4)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2005, 11, 5)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2005, 11, 6)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2005, 1, 22)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2005, 1, 23)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2005, 4, 22)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2005, 2, 17)?, "Ashura"), + (NaiveDate::from_ymd_res(2005, 2, 18)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2006, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2006, 10, 25)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2006, 10, 26)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2006, 1, 11)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2006, 1, 12)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2006, 4, 11)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2006, 2, 7)?, "Ashura"), + (NaiveDate::from_ymd_res(2006, 2, 8)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2007, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2007, 10, 14)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2007, 10, 15)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2007, 12, 21)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2007, 12, 22)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2007, 3, 31)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2007, 1, 27)?, "Ashura"), + (NaiveDate::from_ymd_res(2007, 1, 28)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2008, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2008, 10, 2)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2008, 10, 3)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2008, 10, 4)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2008, 12, 9)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2008, 12, 10)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2008, 12, 11)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2008, 1, 17)?, "Ashura"), + (NaiveDate::from_ymd_res(2008, 1, 18)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2009, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 11, 9)?, "Iqbal Day"), + ( + NaiveDate::from_ymd_res(2009, 12, 25)?, + "Ashura; Quaid-e-Azam Day", + ), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2009, 9, 22)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2009, 9, 23)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2009, 11, 28)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2009, 11, 29)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2009, 11, 30)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2009, 3, 9)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2009, 1, 5)?, "Ashura"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Ashura"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2010, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2010, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2010, 9, 11)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2010, 9, 12)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2010, 11, 18)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2010, 11, 19)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2010, 3, 1)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2010, 12, 15)?, "Ashura"), + (NaiveDate::from_ymd_res(2010, 12, 16)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2011, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2011, 8, 14)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2011, 11, 9)?, + "Eid-ul-Adha; Iqbal Day", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2011, 8, 31)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2011, 9, 1)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2011, 9, 2)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2011, 11, 7)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2011, 11, 8)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2011, 2, 17)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2011, 12, 4)?, "Ashura"), + (NaiveDate::from_ymd_res(2011, 12, 5)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 2, 5)?, + "Eid Milad-un-Nabi; Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2012, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2012, 8, 20)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2012, 8, 21)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2012, 10, 27)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2012, 10, 28)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2012, 11, 22)?, "Ashura"), + (NaiveDate::from_ymd_res(2012, 11, 23)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2013, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2013, 8, 9)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2013, 8, 10)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2013, 10, 16)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2013, 10, 17)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2013, 1, 24)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2013, 11, 12)?, "Ashura"), + (NaiveDate::from_ymd_res(2013, 11, 13)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2014, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2014, 7, 29)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2014, 7, 30)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2014, 7, 31)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2014, 10, 6)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2014, 10, 7)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2014, 10, 8)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2014, 1, 14)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2014, 11, 2)?, "Ashura"), + (NaiveDate::from_ymd_res(2014, 11, 3)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2015, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2015, 7, 18)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2015, 7, 19)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2015, 9, 25)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2015, 9, 26)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2015, 1, 4)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2015, 10, 22)?, "Ashura"), + (NaiveDate::from_ymd_res(2015, 10, 23)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2016, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2016, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2016, 7, 7)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2016, 7, 8)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2016, 9, 13)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2016, 9, 14)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2016, 12, 12)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Ashura"), + (NaiveDate::from_ymd_res(2016, 10, 11)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2017, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2017, 6, 26)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2017, 6, 27)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2017, 6, 28)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2017, 9, 2)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2017, 9, 3)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2017, 9, 4)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2017, 12, 1)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2017, 9, 29)?, "Ashura"), + (NaiveDate::from_ymd_res(2017, 9, 30)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2018, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2018, 6, 16)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2018, 6, 17)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2018, 6, 18)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2018, 8, 23)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2018, 8, 24)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2018, 11, 21)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2018, 9, 20)?, "Ashura"), + (NaiveDate::from_ymd_res(2018, 9, 21)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2019, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2019, 8, 14)?, + "Eid-ul-Adha; Independence Day", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2019, 6, 6)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2019, 6, 7)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2019, 8, 12)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2019, 8, 13)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2019, 11, 10)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2019, 9, 8)?, "Ashura"), + (NaiveDate::from_ymd_res(2019, 9, 9)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2020, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2020, 5, 26)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2020, 8, 1)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2020, 8, 2)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2020, 10, 30)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2020, 8, 28)?, "Ashura"), + (NaiveDate::from_ymd_res(2020, 8, 29)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2021, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2021, 5, 14)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2021, 5, 15)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2021, 7, 21)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2021, 7, 22)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2021, 7, 23)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2021, 10, 19)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2021, 8, 17)?, "Ashura"), + (NaiveDate::from_ymd_res(2021, 8, 18)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2022, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2022, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2022, 5, 4)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2022, 5, 5)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2022, 7, 11)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2022, 7, 12)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2022, 10, 9)?, "Eid Milad-un-Nabi"), + (NaiveDate::from_ymd_res(2022, 8, 8)?, "Ashura"), + (NaiveDate::from_ymd_res(2022, 8, 9)?, "Ashura"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2023, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2023, 4, 23)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2023, 4, 24)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2023, 6, 30)?, "Eid-ul-Adha"), + (NaiveDate::from_ymd_res(2023, 7, 1)?, "Eid-ul-Adha"), + ( + NaiveDate::from_ymd_res(2023, 9, 27)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2023, 7, 27)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2023, 7, 28)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2024, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Quaid-e-Azam Day"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2024, 4, 11)?, "Eid-ul-Fitr"), + (NaiveDate::from_ymd_res(2024, 4, 12)?, "Eid-ul-Fitr"), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2024, 7, 15)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2024, 7, 16)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2025, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 8)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2025, 7, 4)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2025, 7, 5)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2026, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 22)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 29)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2026, 6, 24)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2026, 6, 25)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2027, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "Eid Milad-un-Nabi (estimated); Independence Day", + ), + (NaiveDate::from_ymd_res(2027, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 11)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 18)?, + "Eid-ul-Adha (estimated)", + ), + (NaiveDate::from_ymd_res(2027, 6, 14)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2027, 6, 15)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2028, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 7)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2028, 6, 2)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2028, 6, 3)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 2, 5)?, + "Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2029, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 26)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2029, 5, 22)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2029, 5, 23)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Eid-ul-Fitr (estimated); Kashmir Solidarity Day", + ), + (NaiveDate::from_ymd_res(2030, 3, 23)?, "Pakistan Day"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 8, 14)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 11, 9)?, "Iqbal Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Quaid-e-Azam Day"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "Eid-ul-Fitr (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "Eid-ul-Adha (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "Eid Milad-un-Nabi (estimated)", + ), + (NaiveDate::from_ymd_res(2030, 5, 11)?, "Ashura (estimated)"), + (NaiveDate::from_ymd_res(2030, 5, 12)?, "Ashura (estimated)"), + ], + &mut map, + Country::PK, + "Pakistan", + ); + + Ok(map) +} diff --git a/src/data/pl.rs b/src/data/pl.rs new file mode 100644 index 0000000..853f7bc --- /dev/null +++ b/src/data/pl.rs @@ -0,0 +1,1462 @@ +//! Poland +use super::*; + +/// Generate holiday map for Poland. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2000, 4, 23)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2000, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2001, 4, 15)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2001, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2002, 3, 31)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 1)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2002, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2003, 4, 20)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 21)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2003, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2004, 4, 11)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2004, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2005, 3, 27)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 28)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2005, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2006, 4, 16)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 17)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2006, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2007, 4, 8)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2007, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2008, 3, 23)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2008, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2009, 4, 12)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 13)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2009, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nowy Rok"), + ( + NaiveDate::from_ymd_res(2010, 4, 4)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2010, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2011, 4, 24)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2011, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2012, 4, 8)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 9)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2012, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2013, 3, 31)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 1)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2013, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2014, 4, 20)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2014, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2015, 4, 5)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 6)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2015, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2016, 3, 27)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 28)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2016, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2017, 4, 16)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2017, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2018, 4, 1)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 2)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2018, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 12)?, + "Narodowe Święto Niepodległości - 100-lecie", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2019, 4, 21)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2019, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2020, 4, 12)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 13)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2020, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2021, 4, 4)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 5)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2022, 4, 17)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 18)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2023, 4, 9)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 10)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2023, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2024, 3, 31)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2024, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2025, 4, 20)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2025, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2026, 4, 5)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 6)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2026, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2027, 3, 28)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 29)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2027, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2028, 4, 16)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2028, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2029, 4, 1)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 2)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2029, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nowy Rok"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Święto Trzech Króli"), + ( + NaiveDate::from_ymd_res(2030, 4, 21)?, + "Niedziela Wielkanocna", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Poniedziałek Wielkanocny", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Święto Państwowe"), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "Święto Narodowe Trzeciego Maja", + ), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Zielone Świątki"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Dzień Bożego Ciała"), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Wniebowzięcie Najświętszej Marii Panny", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 1)?, + "Uroczystość Wszystkich Świętych", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 11)?, + "Narodowe Święto Niepodległości", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 25)?, + "Boże Narodzenie (pierwszy dzień)", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Boże Narodzenie (drugi dzień)", + ), + ], + &mut map, + Country::PL, + "Poland", + ); + + Ok(map) +} diff --git a/src/data/pt.rs b/src/data/pt.rs new file mode 100644 index 0000000..6836937 --- /dev/null +++ b/src/data/pt.rs @@ -0,0 +1,1150 @@ +//! Portugal +use super::*; + +/// Generate holiday map for Portugal. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Páscoa"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2000, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2000, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2000, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2000, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Páscoa"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2001, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2001, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2001, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2001, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Páscoa"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2002, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2002, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2002, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2002, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Páscoa"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2003, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2003, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2003, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Páscoa"), + ( + NaiveDate::from_ymd_res(2004, 6, 10)?, + "Corpo de Deus; Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2004, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2004, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Páscoa"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2005, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2005, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2005, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2005, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Páscoa"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2006, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2006, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2006, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2006, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Páscoa"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2007, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2007, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2007, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2007, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Páscoa"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2008, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2008, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Páscoa"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2009, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2009, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2009, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2009, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Páscoa"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2010, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2010, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2010, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2010, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Páscoa"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2011, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2011, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2011, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Páscoa"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2012, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2012, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2012, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2012, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Páscoa"), + (NaiveDate::from_ymd_res(2013, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2013, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Páscoa"), + (NaiveDate::from_ymd_res(2014, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2014, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2014, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Páscoa"), + (NaiveDate::from_ymd_res(2015, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2015, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2015, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Páscoa"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2016, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2016, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2016, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2016, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Páscoa"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2017, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2017, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2017, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2017, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Páscoa"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2018, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2018, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2018, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2018, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Páscoa"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2019, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2019, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2019, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2019, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Páscoa"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2020, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2020, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2020, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2020, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Páscoa"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2021, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2021, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2021, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2021, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Páscoa"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2022, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2022, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2022, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Páscoa"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2023, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2023, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2023, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2023, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Páscoa"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2024, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2024, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2024, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2024, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Páscoa"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2025, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2025, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2025, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2025, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Páscoa"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2026, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2026, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2026, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2026, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Páscoa"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2027, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2027, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2027, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2027, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Páscoa"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2028, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2028, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2028, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2028, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Páscoa"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2029, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2029, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2029, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2029, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Ano Novo"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Sexta-feira Santa"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Páscoa"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Corpo de Deus"), + ( + NaiveDate::from_ymd_res(2030, 10, 5)?, + "Implantação da República", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 1)?, + "Dia de Todos os Santos", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 1)?, + "Restauração da Independência", + ), + (NaiveDate::from_ymd_res(2030, 4, 25)?, "Dia da Liberdade"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Dia do Trabalhador"), + ( + NaiveDate::from_ymd_res(2030, 6, 10)?, + "Dia de Portugal, de Camões e das Comunidades Portuguesas", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Assunção de Nossa Senhora", + ), + (NaiveDate::from_ymd_res(2030, 12, 8)?, "Imaculada Conceição"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Dia de Natal"), + ], + &mut map, + Country::PT, + "Portugal", + ); + + Ok(map) +} diff --git a/src/data/py.rs b/src/data/py.rs new file mode 100644 index 0000000..3db8bda --- /dev/null +++ b/src/data/py.rs @@ -0,0 +1,1430 @@ +//! Paraguay +use super::*; + +/// Generate holiday map for Paraguay. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2000, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2000, 4, 23)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2000, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2001, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2001, 4, 15)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2001, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2002, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2002, 3, 31)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2002, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2003, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2003, 4, 20)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2003, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2004, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2004, 4, 11)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2004, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2005, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2005, 3, 27)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2005, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2006, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2006, 4, 16)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2006, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2007, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2007, 4, 8)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2007, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2007, 1, 29)?, "Asueto adicionale"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2008, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2008, 3, 23)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2008, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2009, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2009, 4, 12)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2009, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2009, 9, 10)?, "Asueto adicionale"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2010, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2010, 4, 4)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2010, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2010, 6, 14)?, "Asueto adicionale"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2011, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2011, 4, 24)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2011, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2011, 4, 19)?, "Asueto adicionale"), + (NaiveDate::from_ymd_res(2011, 5, 14)?, "Asueto adicionale"), + (NaiveDate::from_ymd_res(2011, 5, 16)?, "Asueto adicionale"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2012, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2012, 4, 8)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2012, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2013, 3, 4)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2013, 3, 31)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2013, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2013, 8, 14)?, "Asueto adicionale"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2014, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2014, 4, 20)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2014, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 16)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2015, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2015, 4, 5)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2015, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 28)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), + (NaiveDate::from_ymd_res(2015, 7, 10)?, "Asueto adicionale"), + (NaiveDate::from_ymd_res(2015, 7, 11)?, "Asueto adicionale"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2016, 2, 29)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2016, 3, 27)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2016, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 3)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2017, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2017, 4, 16)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2017, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 2)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2018, 2, 26)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2018, 4, 1)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2018, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 11)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2019, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2019, 4, 21)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2019, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2020, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2020, 4, 12)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2020, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2021, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2021, 4, 4)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 27)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2022, 2, 28)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2022, 4, 17)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2022, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 3)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2023, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2023, 4, 9)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2023, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2024, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2024, 3, 31)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2024, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2025, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2025, 4, 20)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2025, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2026, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2026, 4, 5)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2026, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2027, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2027, 3, 28)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2027, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2028, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2028, 4, 16)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2028, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2029, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2029, 4, 1)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2030, 3, 1)?, + "Día de los Héroes de la Patria", + ), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2030, 4, 21)?, + "Domingo de Resurrección", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Día del Trabajador"), + ( + NaiveDate::from_ymd_res(2030, 5, 14)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 15)?, + "Día de la Independencia Nacional", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 12)?, + "Día de la Paz del Chaco", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Día de la Fundación de Asunción", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 29)?, + "Día de la Batalla de Boquerón", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "Día de la Virgen de Caacupé", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), + ], + &mut map, + Country::PY, + "Paraguay", + ); + + Ok(map) +} diff --git a/src/data/ro.rs b/src/data/ro.rs new file mode 100644 index 0000000..51163f1 --- /dev/null +++ b/src/data/ro.rs @@ -0,0 +1,989 @@ +//! Romania +use super::*; + +/// Generate holiday map for Romania. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "Paștele"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Paștele; Ziua Muncii"), + (NaiveDate::from_ymd_res(2000, 6, 18)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2000, 6, 19)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2000, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Paștele"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2001, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2002, 6, 23)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2002, 6, 24)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2002, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Paștele"), + (NaiveDate::from_ymd_res(2003, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2003, 6, 15)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2003, 6, 16)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2003, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Paștele"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Paștele"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2004, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Paștele; Ziua Muncii"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2005, 6, 19)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2005, 6, 20)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2005, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "Paștele"), + (NaiveDate::from_ymd_res(2006, 4, 24)?, "Paștele"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2006, 6, 11)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2006, 6, 12)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2006, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Paștele"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Paștele"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2007, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Paștele"), + (NaiveDate::from_ymd_res(2008, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2008, 6, 15)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2008, 6, 16)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2008, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "Paștele"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2009, 6, 7)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2009, 6, 8)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Paștele"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Paștele"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Paștele"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "Paștele"), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2012, 6, 3)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2012, 6, 4)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2013, 6, 23)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2013, 6, 24)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Paștele"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "Paștele"), + (NaiveDate::from_ymd_res(2015, 4, 13)?, "Paștele"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2015, 5, 31)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2015, 6, 1)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2016, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Paștele; Ziua Muncii"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2016, 6, 19)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2016, 6, 20)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2017, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Paștele"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2017, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2018, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "Paștele"), + (NaiveDate::from_ymd_res(2018, 4, 9)?, "Paștele"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2018, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2018, 5, 27)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2019, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "Paștele"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "Paștele"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2019, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2019, 6, 16)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2019, 6, 17)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2020, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2020, 4, 17)?, "Paștele"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "Paștele"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2020, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2020, 6, 7)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2020, 6, 8)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2021, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "Paștele"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "Paștele"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2021, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2021, 6, 20)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2021, 6, 21)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2022, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "Paștele"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "Paștele"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "Paștele"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2022, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2022, 6, 12)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2022, 6, 13)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Anul Nou"), + ( + NaiveDate::from_ymd_res(2023, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "Paștele"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "Paștele"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2023, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2023, 6, 4)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2023, 6, 5)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Bobotează"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "Sfântul Ion"), + ( + NaiveDate::from_ymd_res(2024, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "Paștele"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "Paștele"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2024, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2024, 6, 23)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2024, 6, 24)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Bobotează"), + (NaiveDate::from_ymd_res(2025, 1, 7)?, "Sfântul Ion"), + ( + NaiveDate::from_ymd_res(2025, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Paștele"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Paștele"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Paștele"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2025, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Bobotează"), + (NaiveDate::from_ymd_res(2026, 1, 7)?, "Sfântul Ion"), + ( + NaiveDate::from_ymd_res(2026, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2026, 4, 10)?, "Paștele"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "Paștele"), + (NaiveDate::from_ymd_res(2026, 4, 13)?, "Paștele"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Ziua Muncii"), + ( + NaiveDate::from_ymd_res(2026, 6, 1)?, + "Rusaliile; Ziua Copilului", + ), + (NaiveDate::from_ymd_res(2026, 5, 31)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Bobotează"), + (NaiveDate::from_ymd_res(2027, 1, 7)?, "Sfântul Ion"), + ( + NaiveDate::from_ymd_res(2027, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2027, 4, 30)?, "Paștele"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "Paștele"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "Paștele"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2027, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2027, 6, 20)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2027, 6, 21)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Bobotează"), + (NaiveDate::from_ymd_res(2028, 1, 7)?, "Sfântul Ion"), + ( + NaiveDate::from_ymd_res(2028, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Paștele"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Paștele"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Paștele"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2028, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2028, 6, 5)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Bobotează"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "Sfântul Ion"), + ( + NaiveDate::from_ymd_res(2029, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "Paștele"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "Paștele"), + (NaiveDate::from_ymd_res(2029, 4, 9)?, "Paștele"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2029, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2029, 5, 27)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2029, 5, 28)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Anul Nou"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Bobotează"), + (NaiveDate::from_ymd_res(2030, 1, 7)?, "Sfântul Ion"), + ( + NaiveDate::from_ymd_res(2030, 1, 24)?, + "Ziua Unirii Principatelor Române", + ), + (NaiveDate::from_ymd_res(2030, 4, 26)?, "Paștele"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "Paștele"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "Paștele"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Ziua Muncii"), + (NaiveDate::from_ymd_res(2030, 6, 1)?, "Ziua Copilului"), + (NaiveDate::from_ymd_res(2030, 6, 16)?, "Rusaliile"), + (NaiveDate::from_ymd_res(2030, 6, 17)?, "Rusaliile"), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Adormirea Maicii Domnului", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 30)?, + "Sfantul Apostol Andrei cel Intai chemat", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 1)?, + "Ziua Națională a României", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Crăciunul"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Crăciunul"), + ], + &mut map, + Country::RO, + "Romania", + ); + + Ok(map) +} diff --git a/src/data/rs.rs b/src/data/rs.rs new file mode 100644 index 0000000..e8e8e86 --- /dev/null +++ b/src/data/rs.rs @@ -0,0 +1,1099 @@ +//! Serbia +use super::*; + +/// Generate holiday map for Serbia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2000, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2000, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 16)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Други дан Васкрса; Празник рада", + ), + (NaiveDate::from_ymd_res(2000, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2000, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2000, 4, 28)?, "Велики петак"), + (NaiveDate::from_ymd_res(2000, 4, 29)?, "Велика субота"), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "Васкрс"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2001, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2001, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2001, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2001, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2001, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 12)?, + "Дан примирја у Првом светском рату (слободан дан)", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Велики петак"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "Велика субота"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Васкрс"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2002, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2002, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2002, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2002, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2002, 5, 3)?, "Велики петак"), + (NaiveDate::from_ymd_res(2002, 5, 4)?, "Велика субота"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Васкрс"), + (NaiveDate::from_ymd_res(2002, 5, 6)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2003, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2003, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 16)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2003, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2003, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "Велики петак"), + (NaiveDate::from_ymd_res(2003, 4, 26)?, "Велика субота"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Васкрс"), + (NaiveDate::from_ymd_res(2003, 4, 28)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2004, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2004, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2004, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2004, 5, 3)?, + "Празник рада (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Велики петак"), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "Велика субота"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Васкрс"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2005, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2005, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Васкрс; Празник рада"), + ( + NaiveDate::from_ymd_res(2005, 5, 3)?, + "Празник рада (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Други дан Васкрса; Празник рада", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2005, 4, 29)?, "Велики петак"), + (NaiveDate::from_ymd_res(2005, 4, 30)?, "Велика субота"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2006, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2006, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2006, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2006, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2006, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "Велики петак"), + (NaiveDate::from_ymd_res(2006, 4, 22)?, "Велика субота"), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "Васкрс"), + (NaiveDate::from_ymd_res(2006, 4, 24)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2007, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2007, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2007, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2007, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 12)?, + "Дан примирја у Првом светском рату (слободан дан)", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Велики петак"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "Велика субота"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Васкрс"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2008, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2008, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2008, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2008, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "Велики петак"), + (NaiveDate::from_ymd_res(2008, 4, 26)?, "Велика субота"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Васкрс"), + (NaiveDate::from_ymd_res(2008, 4, 28)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2009, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2009, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2009, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2009, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2009, 4, 17)?, "Велики петак"), + (NaiveDate::from_ymd_res(2009, 4, 18)?, "Велика субота"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "Васкрс"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2010, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2010, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2010, 5, 3)?, + "Празник рада (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Велики петак"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "Велика субота"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Васкрс"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2011, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2011, 5, 3)?, + "Празник рада (слободан дан)", + ), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2011, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Велики петак"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "Велика субота"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Васкрс"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2012, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2012, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2012, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2012, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2012, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 12)?, + "Дан примирја у Првом светском рату (слободан дан)", + ), + (NaiveDate::from_ymd_res(2012, 4, 13)?, "Велики петак"), + (NaiveDate::from_ymd_res(2012, 4, 14)?, "Велика субота"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "Васкрс"), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2013, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2013, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2013, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2013, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2013, 5, 3)?, "Велики петак"), + (NaiveDate::from_ymd_res(2013, 5, 4)?, "Велика субота"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Васкрс"), + (NaiveDate::from_ymd_res(2013, 5, 6)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2014, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2014, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 16)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2014, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2014, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Велики петак"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "Велика субота"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Васкрс"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2015, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2015, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2015, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2015, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2015, 4, 10)?, "Велики петак"), + (NaiveDate::from_ymd_res(2015, 4, 11)?, "Велика субота"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "Васкрс"), + (NaiveDate::from_ymd_res(2015, 4, 13)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2016, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2016, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Васкрс; Празник рада"), + ( + NaiveDate::from_ymd_res(2016, 5, 3)?, + "Празник рада (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Други дан Васкрса; Празник рада", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2016, 4, 29)?, "Велики петак"), + (NaiveDate::from_ymd_res(2016, 4, 30)?, "Велика субота"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2017, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2017, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2017, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2017, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2017, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Велики петак"), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "Велика субота"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Васкрс"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2018, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2018, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2018, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 12)?, + "Дан примирја у Првом светском рату (слободан дан)", + ), + (NaiveDate::from_ymd_res(2018, 4, 6)?, "Велики петак"), + (NaiveDate::from_ymd_res(2018, 4, 7)?, "Велика субота"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "Васкрс"), + (NaiveDate::from_ymd_res(2018, 4, 9)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2019, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2019, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2019, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2019, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2019, 4, 26)?, "Велики петак"), + (NaiveDate::from_ymd_res(2019, 4, 27)?, "Велика субота"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "Васкрс"), + (NaiveDate::from_ymd_res(2019, 4, 29)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2020, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2020, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2020, 2, 16)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2020, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2020, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2020, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2020, 4, 17)?, "Велики петак"), + (NaiveDate::from_ymd_res(2020, 4, 18)?, "Велика субота"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "Васкрс"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2021, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 16)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Велика субота; Празник рада", + ), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Васкрс; Празник рада"), + ( + NaiveDate::from_ymd_res(2021, 5, 4)?, + "Празник рада (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2021, 4, 30)?, "Велики петак"), + (NaiveDate::from_ymd_res(2021, 5, 3)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2022, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2022, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Празник рада (слободан дан)", + ), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2022, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2022, 4, 22)?, "Велики петак"), + (NaiveDate::from_ymd_res(2022, 4, 23)?, "Велика субота"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "Васкрс"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2023, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2023, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2023, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2023, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2023, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2023, 4, 14)?, "Велики петак"), + (NaiveDate::from_ymd_res(2023, 4, 15)?, "Велика субота"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "Васкрс"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2024, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2024, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2024, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2024, 5, 3)?, "Велики петак"), + (NaiveDate::from_ymd_res(2024, 5, 4)?, "Велика субота"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "Васкрс"), + (NaiveDate::from_ymd_res(2024, 5, 6)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2025, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2025, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 16)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2025, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2025, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Велики петак"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "Велика субота"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Васкрс"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2026, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2026, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 17)?, + "Дан државности Србије (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2026, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2026, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2026, 4, 10)?, "Велики петак"), + (NaiveDate::from_ymd_res(2026, 4, 11)?, "Велика субота"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "Васкрс"), + (NaiveDate::from_ymd_res(2026, 4, 13)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2027, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2027, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 16)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Велика субота; Празник рада", + ), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "Васкрс; Празник рада"), + ( + NaiveDate::from_ymd_res(2027, 5, 4)?, + "Празник рада (слободан дан)", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2027, 4, 30)?, "Велики петак"), + (NaiveDate::from_ymd_res(2027, 5, 3)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Нова година"), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "Нова година (слободан дан)", + ), + (NaiveDate::from_ymd_res(2028, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2028, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2028, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2028, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Велики петак"), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "Велика субота"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Васкрс"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2029, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2029, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 12)?, + "Дан примирја у Првом светском рату (слободан дан)", + ), + (NaiveDate::from_ymd_res(2029, 4, 6)?, "Велики петак"), + (NaiveDate::from_ymd_res(2029, 4, 7)?, "Велика субота"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "Васкрс"), + (NaiveDate::from_ymd_res(2029, 4, 9)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Нова година"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Нова година"), + (NaiveDate::from_ymd_res(2030, 1, 7)?, "Божић"), + ( + NaiveDate::from_ymd_res(2030, 2, 15)?, + "Дан државности Србије", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 16)?, + "Дан државности Србије", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Празник рада"), + (NaiveDate::from_ymd_res(2030, 5, 2)?, "Празник рада"), + ( + NaiveDate::from_ymd_res(2030, 11, 11)?, + "Дан примирја у Првом светском рату", + ), + (NaiveDate::from_ymd_res(2030, 4, 26)?, "Велики петак"), + (NaiveDate::from_ymd_res(2030, 4, 27)?, "Велика субота"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "Васкрс"), + (NaiveDate::from_ymd_res(2030, 4, 29)?, "Други дан Васкрса"), + ], + &mut map, + Country::RS, + "Serbia", + ); + + Ok(map) +} diff --git a/src/data/ru.rs b/src/data/ru.rs new file mode 100644 index 0000000..9f1d376 --- /dev/null +++ b/src/data/ru.rs @@ -0,0 +1,1133 @@ +//! Russia +use super::*; + +/// Generate holiday map for Russia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Новый год"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "Новый год"), + (NaiveDate::from_ymd_res(2000, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2000, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Праздник Весны и Труда", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 2)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2000, 5, 9)?, "День Победы"), + ( + NaiveDate::from_ymd_res(2000, 6, 12)?, + "День принятия Декларации о государственном суверенитете Российской Федерации", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 7)?, + "День согласия и примирения", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Новый год"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "Новый год"), + (NaiveDate::from_ymd_res(2001, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2001, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Праздник Весны и Труда", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 2)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2001, 5, 9)?, "День Победы"), + ( + NaiveDate::from_ymd_res(2001, 6, 12)?, + "День принятия Декларации о государственном суверенитете Российской Федерации", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 7)?, + "День согласия и примирения", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Новый год"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "Новый год"), + (NaiveDate::from_ymd_res(2002, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Праздник Весны и Труда", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 2)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2002, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2002, 11, 7)?, + "День согласия и примирения", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Новый год"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "Новый год"), + (NaiveDate::from_ymd_res(2003, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2003, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Праздник Весны и Труда", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 2)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2003, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2003, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2003, 11, 7)?, + "День согласия и примирения", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Новый год"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "Новый год"), + (NaiveDate::from_ymd_res(2004, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2004, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Праздник Весны и Труда", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 2)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2004, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2004, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2004, 11, 7)?, + "День согласия и примирения", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2005, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2005, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2005, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2005, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2005, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2005, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2005, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2006, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2006, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2006, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2006, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2006, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2006, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2006, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2006, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2007, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2007, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2007, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2007, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2007, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2007, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2007, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2007, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2008, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2008, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2008, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2008, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2008, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2008, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2008, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2008, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2009, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2009, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2009, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2009, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2009, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2009, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2009, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2009, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2010, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2010, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2010, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2010, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2010, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2010, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2010, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2010, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2011, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2011, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2011, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2011, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2011, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2011, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2011, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2012, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2012, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2012, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2012, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2012, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2012, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2012, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2012, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2013, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2013, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2013, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2013, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2013, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2013, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2013, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2013, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2014, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2014, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2014, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2014, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2014, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2014, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2014, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2014, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2014, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2014, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2015, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2015, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2015, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2015, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2015, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2015, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2015, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2015, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2015, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2015, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2016, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2016, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2016, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2016, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2016, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2016, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2016, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2016, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2016, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2016, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2017, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2017, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2017, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2017, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2017, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2017, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2017, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2017, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2017, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2018, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2018, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2018, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2018, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2018, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2018, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2018, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2018, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2019, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2019, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2019, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2019, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2019, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2019, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2019, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2019, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2019, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2020, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2020, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2020, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2020, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2020, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2020, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2020, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2020, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2020, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2021, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2021, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2021, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2021, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2021, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2021, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2021, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2021, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2021, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2022, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2022, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2022, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2022, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2022, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2022, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2022, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2022, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2022, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2023, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2023, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2023, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2023, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2023, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2023, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2023, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2023, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2023, 11, 4)?, + "День народного единства", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 24)?, + "Выходной (перенесено с 01.01.2023)", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 8)?, + "Выходной (перенесено с 08.01.2023)", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2024, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2024, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2024, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2024, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2024, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2024, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2024, 11, 4)?, + "День народного единства", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 29)?, + "Выходной (перенесено с 27.04.2024)", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 30)?, + "Выходной (перенесено с 02.11.2024)", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 10)?, + "Выходной (перенесено с 06.01.2024)", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 30)?, + "Выходной (перенесено с 28.12.2024)", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 31)?, + "Выходной (перенесено с 07.01.2024)", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2025, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2025, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2025, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2025, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2025, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2025, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2025, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2025, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2025, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2026, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2026, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2026, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2026, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2026, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2026, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2026, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2026, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2026, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2027, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2027, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2027, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2027, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2027, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2027, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2027, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2027, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2027, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2028, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2028, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2028, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2028, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2028, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2028, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2028, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2028, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2028, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2029, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2029, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2029, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2029, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2029, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2029, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2029, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2029, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2030, 1, 3)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2030, 1, 4)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2030, 1, 5)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2030, 1, 8)?, "Новогодние каникулы"), + (NaiveDate::from_ymd_res(2030, 1, 7)?, "Рождество Христово"), + ( + NaiveDate::from_ymd_res(2030, 2, 23)?, + "День защитника Отечества", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "Международный женский день", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Праздник Весны и Труда", + ), + (NaiveDate::from_ymd_res(2030, 5, 9)?, "День Победы"), + (NaiveDate::from_ymd_res(2030, 6, 12)?, "День России"), + ( + NaiveDate::from_ymd_res(2030, 11, 4)?, + "День народного единства", + ), + ], + &mut map, + Country::RU, + "Russia", + ); + + Ok(map) +} diff --git a/src/data/sa.rs b/src/data/sa.rs new file mode 100644 index 0000000..7963fad --- /dev/null +++ b/src/data/sa.rs @@ -0,0 +1,1608 @@ +//! Saudi Arabia +use super::*; + +/// Generate holiday map for Saudi Arabia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 30)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 31)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2000, 3, 15)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 19)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 20)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 19)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2001, 3, 4)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "(ملاحظة) عطلة عيد الفطر", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 9)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 10)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2002, 2, 21)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2002, 2, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 25)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 26)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 29)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 30)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2003, 2, 10)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2003, 2, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 15)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2004, 1, 31)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2004, 2, 1)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 3)?, + "(تقدير) عطلة عيد الأضحى", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 11, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 7)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 8)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2005, 1, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 24)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 25)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2005, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2005, 9, 24)?, + "(ملاحظة) اليوم الوطني", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 10, 23)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 28)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2006, 1, 9)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2006, 12, 30)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2006, 1, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 14)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2006, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 10, 13)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2007, 12, 19)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2007, 12, 20)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 23)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 24)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2007, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 5)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 6)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2008, 12, 7)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 9)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2008, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 9, 20)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 23)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2009, 11, 26)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 30)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 1)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 9, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 13)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 14)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2010, 11, 15)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2010, 11, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 20)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2010, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2010, 9, 22)?, + "(ملاحظة) اليوم الوطني", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 2)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 3)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 4)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2011, 11, 5)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2011, 11, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2011, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2011, 9, 24)?, + "(ملاحظة) اليوم الوطني", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 8, 19)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2012, 10, 25)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2012, 10, 26)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 27)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 29)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 30)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2012, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 8, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 12)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 13)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2013, 10, 15)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2013, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 7, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 30)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2014, 10, 4)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 5)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 7)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 8)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2014, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 7, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 19)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 20)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 21)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 22)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2015, 9, 22)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2015, 9, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 25)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 27)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 7, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 10)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 11)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2016, 9, 10)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2016, 9, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 14)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2016, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2016, 9, 22)?, + "(ملاحظة) اليوم الوطني", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 6, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2017, 8, 31)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2017, 9, 1)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 3)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 4)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 5)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2017, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2017, 9, 24)?, + "(ملاحظة) اليوم الوطني", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 6, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 19)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 20)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2018, 8, 20)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2018, 8, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2018, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 6, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 9)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2019, 8, 10)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2019, 8, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 14)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2019, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 5, 24)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2020, 7, 30)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2020, 7, 31)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 1)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 3)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 4)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2020, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 17)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 18)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2021, 7, 19)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2021, 7, 20)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2021, 9, 23)?, "اليوم الوطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2022, 7, 8)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2022, 7, 9)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 12)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 13)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2022, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2022, 9, 22)?, + "(ملاحظة) اليوم الوطني", + ), + (NaiveDate::from_ymd_res(2022, 2, 22)?, "يوم التأسيسي"), + (NaiveDate::from_ymd_res(2022, 11, 23)?, "يوم وطني"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 4, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 23)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 25)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 26)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2023, 6, 27)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2023, 6, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 30)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 2)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2023, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2023, 9, 24)?, + "(ملاحظة) اليوم الوطني", + ), + (NaiveDate::from_ymd_res(2023, 2, 22)?, "يوم التأسيسي"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 4, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 13)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 14)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 15)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2024, 6, 15)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 19)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2024, 9, 23)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2024, 2, 22)?, "يوم التأسيسي"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 2)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2025, 6, 5)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 9)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 10)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2025, 9, 23)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2025, 2, 22)?, "يوم التأسيسي"), + ( + NaiveDate::from_ymd_res(2025, 2, 23)?, + "(ملاحظة) يوم التأسيسي", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 23)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 24)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 25)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2026, 5, 26)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 31)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2026, 9, 23)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2026, 2, 22)?, "يوم التأسيسي"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 14)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2027, 5, 15)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 19)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2027, 9, 23)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2027, 2, 22)?, "يوم التأسيسي"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 1)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2028, 5, 4)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 8)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2028, 9, 23)?, "اليوم الوطني"), + ( + NaiveDate::from_ymd_res(2028, 9, 24)?, + "(ملاحظة) اليوم الوطني", + ), + (NaiveDate::from_ymd_res(2028, 2, 22)?, "يوم التأسيسي"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 18)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 19)?, + "(تقدير ملاحظة) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2029, 4, 23)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 26)?, + "(تقدير) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2029, 9, 23)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2029, 2, 22)?, "يوم التأسيسي"), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2030, 4, 12)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 16)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 17)?, + "(تقدير ملاحظة) عطلة عيد الأضحى", + ), + (NaiveDate::from_ymd_res(2030, 9, 23)?, "اليوم الوطني"), + (NaiveDate::from_ymd_res(2030, 2, 22)?, "يوم التأسيسي"), + ( + NaiveDate::from_ymd_res(2030, 2, 21)?, + "(ملاحظة) يوم التأسيسي", + ), + ], + &mut map, + Country::SA, + "Saudi Arabia", + ); + + Ok(map) +} diff --git a/src/data/se.rs b/src/data/se.rs new file mode 100644 index 0000000..3cc02e4 --- /dev/null +++ b/src/data/se.rs @@ -0,0 +1,2468 @@ +//! Sweden +use super::*; + +/// Generate holiday map for Sweden. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2000, 6, 1)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2000, 6, 12)?, "Annandag pingst"), + (NaiveDate::from_ymd_res(2000, 6, 23)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2000, 6, 24)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2000, 11, 4)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Julafton; Söndag"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2000, 12, 31)?, "Nyårsafton; Söndag"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 1, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 1, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 1, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 1, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 2, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 2, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 2, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 2, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 3, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 3, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 3, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 3, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 4, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 4, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 4, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 5, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 5, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 5, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 5, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 6, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 6, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 6, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 7, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 7, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 7, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 7, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 7, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 8, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 8, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 8, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 8, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 9, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 9, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 9, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 9, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 10, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 10, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 10, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 10, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 10, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 11, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 11, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 11, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 11, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 12, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 12, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2000, 12, 17)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2001, 5, 24)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Annandag pingst"), + (NaiveDate::from_ymd_res(2001, 6, 22)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2001, 6, 23)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2001, 11, 3)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2001, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2001, 1, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 1, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 1, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 1, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 2, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 2, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 2, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 2, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 3, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 3, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 3, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 3, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 4, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 4, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 4, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 4, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 5, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 5, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 5, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 5, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 6, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 6, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 6, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 7, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 7, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 7, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 7, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 7, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 8, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 8, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 8, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 8, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 9, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 9, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 9, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 9, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 9, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 10, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 10, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 10, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 10, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 11, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 11, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 11, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 11, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 12, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 12, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 12, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2001, 12, 30)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nyårsdagen"), + ( + NaiveDate::from_ymd_res(2002, 1, 6)?, + "Söndag; Trettondedag jul", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2002, 5, 20)?, "Annandag pingst"), + (NaiveDate::from_ymd_res(2002, 6, 21)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2002, 6, 22)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2002, 11, 2)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2002, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2002, 1, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 1, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 1, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 2, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 2, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 2, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 2, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 3, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 3, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 3, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 3, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 4, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 4, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 4, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 4, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 5, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 5, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 6, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 6, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 6, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 6, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 6, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 7, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 7, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 7, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 7, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 8, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 8, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 8, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 8, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 9, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 9, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 9, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 9, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 9, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 10, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 10, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 10, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 10, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 11, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 11, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 11, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 11, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 12, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 12, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 12, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 12, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2002, 12, 29)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2003, 5, 29)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2003, 6, 9)?, "Annandag pingst"), + (NaiveDate::from_ymd_res(2003, 6, 20)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2003, 6, 21)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2003, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2003, 1, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 1, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 1, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 1, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 2, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 2, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 2, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 2, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 3, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 3, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 3, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 3, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 3, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 4, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 4, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 5, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 5, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 5, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 5, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 6, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 6, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 6, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 6, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 7, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 7, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 7, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 7, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 8, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 8, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 8, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 8, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 8, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 9, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 9, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 9, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 9, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 10, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 10, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 10, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 10, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 11, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 11, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 11, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 11, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 11, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 12, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 12, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 12, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2003, 12, 28)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2004, 5, 20)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Annandag pingst"), + (NaiveDate::from_ymd_res(2004, 6, 25)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2004, 6, 26)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2004, 11, 6)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Juldagen"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Annandag jul; Söndag", + ), + (NaiveDate::from_ymd_res(2004, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2004, 1, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 1, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 1, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 1, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 2, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 2, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 2, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 2, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 3, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 3, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 3, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 3, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 4, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 4, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 4, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 5, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 5, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 5, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 5, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 6, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 6, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 6, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 6, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 7, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 7, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 7, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 7, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 8, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 8, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 8, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 8, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 9, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 9, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 9, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 9, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 10, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 10, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 10, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 10, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 10, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 11, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 11, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 11, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 12, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 12, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2004, 12, 19)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Första maj; Söndag"), + ( + NaiveDate::from_ymd_res(2005, 5, 5)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2005, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2005, 6, 24)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2005, 6, 25)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2005, 11, 5)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Juldagen; Söndag"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2005, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 1, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 1, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 1, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 1, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 2, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 2, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 2, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 2, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 3, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 3, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 3, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 4, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 4, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 4, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 4, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 5, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 5, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 5, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 6, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 6, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 6, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 6, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 7, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 7, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 7, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 7, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 7, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 8, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 8, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 8, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 8, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 9, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 9, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 9, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 9, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 10, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 10, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 10, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 10, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 10, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 11, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 11, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 11, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 11, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 12, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 12, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2005, 12, 18)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nyårsdagen; Söndag"), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2006, 5, 25)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2006, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2006, 6, 23)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2006, 6, 24)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2006, 11, 4)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Julafton; Söndag"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Nyårsafton; Söndag"), + (NaiveDate::from_ymd_res(2006, 1, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 1, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 1, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 1, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 2, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 2, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 2, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 2, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 3, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 3, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 3, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 3, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 4, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 4, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 4, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 5, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 5, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 5, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 5, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 6, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 6, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 6, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 7, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 7, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 7, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 7, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 7, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 8, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 8, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 8, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 8, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 9, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 9, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 9, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 9, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 10, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 10, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 10, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 10, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 10, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 11, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 11, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 11, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 11, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 12, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 12, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2006, 12, 17)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2007, 5, 17)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2007, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2007, 6, 22)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2007, 6, 23)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2007, 11, 3)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2007, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2007, 1, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 1, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 1, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 1, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 2, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 2, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 2, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 2, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 3, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 3, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 3, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 3, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 4, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 4, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 4, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 4, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 5, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 5, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 5, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 6, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 6, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 6, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 6, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 7, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 7, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 7, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 7, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 7, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 8, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 8, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 8, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 8, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 9, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 9, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 9, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 9, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 9, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 10, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 10, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 10, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 10, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 11, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 11, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 11, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 11, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 12, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 12, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 12, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 12, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2007, 12, 30)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nyårsdagen"), + ( + NaiveDate::from_ymd_res(2008, 1, 6)?, + "Söndag; Trettondedag jul", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Annandag påsk"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Första maj; Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2008, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2008, 6, 20)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2008, 6, 21)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2008, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2008, 1, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 1, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 1, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 2, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 2, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 2, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 2, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 3, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 3, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 3, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 3, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 4, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 4, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 4, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 5, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 5, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 5, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 6, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 6, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 6, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 6, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 6, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 7, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 7, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 7, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 7, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 8, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 8, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 8, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 8, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 8, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 9, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 9, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 9, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 9, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 10, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 10, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 10, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 10, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 11, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 11, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 11, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 11, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 11, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 12, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 12, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 12, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2008, 12, 28)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2009, 5, 21)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2009, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2009, 6, 19)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2009, 6, 20)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2009, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2009, 1, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 1, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 1, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 1, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 2, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 2, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 2, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 2, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 3, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 3, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 3, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 3, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 3, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 4, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 4, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 5, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 5, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 5, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 5, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 6, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 6, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 6, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 6, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 7, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 7, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 7, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 7, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 8, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 8, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 8, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 8, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 8, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 9, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 9, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 9, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 10, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 10, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 10, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 10, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 11, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 11, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 11, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 11, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 12, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 12, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 12, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2009, 12, 27)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2010, 5, 13)?, + "Kristi himmelsfärdsdag", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 6)?, + "Sveriges nationaldag; Söndag", + ), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2010, 6, 25)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2010, 6, 26)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2010, 11, 6)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Juldagen"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Annandag jul; Söndag", + ), + (NaiveDate::from_ymd_res(2010, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2010, 1, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 1, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 1, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 1, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 1, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 2, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 2, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 2, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 2, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 3, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 3, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 3, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 3, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 4, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 4, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 4, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 5, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 5, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 5, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 5, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 6, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 6, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 6, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 7, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 7, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 7, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 7, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 8, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 8, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 8, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 8, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 9, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 9, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 9, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 9, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 10, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 10, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 10, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 10, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 10, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 11, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 11, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 11, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 11, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 12, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 12, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2010, 12, 19)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Första maj; Söndag"), + ( + NaiveDate::from_ymd_res(2011, 6, 2)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2011, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2011, 6, 24)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2011, 6, 25)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2011, 11, 5)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Juldagen; Söndag"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2011, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 1, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 1, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 1, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 1, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 2, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 2, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 2, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 2, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 3, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 3, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 3, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 3, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 4, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 4, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 4, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 5, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 5, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 5, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 5, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 6, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 6, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 6, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 7, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 7, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 7, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 7, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 7, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 8, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 8, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 8, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 8, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 9, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 9, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 9, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 9, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 10, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 10, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 10, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 10, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 10, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 11, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 11, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 11, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 12, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 12, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2011, 12, 18)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nyårsdagen; Söndag"), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2012, 5, 17)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2012, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2012, 6, 22)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2012, 11, 3)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2012, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2012, 1, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 1, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 1, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 1, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 2, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 2, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 2, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 2, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 3, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 3, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 3, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 3, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 4, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 4, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 4, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 5, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 5, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 5, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 6, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 6, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 6, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 6, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 7, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 7, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 7, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 7, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 7, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 8, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 8, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 8, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 9, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 9, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 9, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 9, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 9, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 10, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 10, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 10, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 10, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 11, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 11, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 11, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 11, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 12, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 12, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 12, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 12, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2012, 12, 30)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nyårsdagen"), + ( + NaiveDate::from_ymd_res(2013, 1, 6)?, + "Söndag; Trettondedag jul", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2013, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2013, 6, 21)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2013, 6, 22)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2013, 11, 2)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2013, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2013, 1, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 1, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 1, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 2, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 2, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 2, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 2, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 3, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 3, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 3, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 3, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 4, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 4, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 4, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 4, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 5, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 5, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 6, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 6, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 6, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 6, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 6, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 7, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 7, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 7, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 7, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 8, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 8, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 8, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 8, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 9, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 9, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 9, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 9, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 9, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 10, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 10, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 10, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 10, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 11, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 11, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 11, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 11, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 12, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 12, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 12, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2013, 12, 29)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2014, 5, 29)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2014, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2014, 6, 20)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2014, 6, 21)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2014, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2014, 1, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 1, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 1, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 1, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 2, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 2, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 2, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 2, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 3, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 3, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 3, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 3, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 3, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 4, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 4, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 4, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 5, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 5, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 5, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 5, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 6, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 6, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 6, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 6, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 7, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 7, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 7, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 7, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 8, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 8, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 8, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 8, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 8, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 9, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 9, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 9, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 9, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 10, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 10, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 10, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 10, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 11, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 11, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 11, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 11, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 11, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 12, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 12, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 12, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2014, 12, 28)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2015, 5, 14)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2015, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2015, 6, 19)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2015, 6, 20)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2015, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2015, 1, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 1, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 1, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 1, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 2, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 2, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 2, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 2, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 3, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 3, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 3, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 3, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 3, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 4, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 4, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 5, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 5, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 5, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 5, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 6, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 6, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 6, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 6, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 7, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 7, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 7, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 7, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 8, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 8, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 8, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 8, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 8, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 9, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 9, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 9, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 9, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 10, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 10, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 10, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 10, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 11, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 11, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 11, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 11, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 12, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 12, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 12, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2015, 12, 27)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Första maj; Söndag"), + ( + NaiveDate::from_ymd_res(2016, 5, 5)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2016, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2016, 6, 24)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2016, 6, 25)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2016, 11, 5)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Juldagen; Söndag"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2016, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2016, 1, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 1, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 1, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 1, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 1, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 2, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 2, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 2, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 2, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 3, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 3, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 3, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 4, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 4, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 4, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 4, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 5, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 5, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 5, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 6, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 6, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 6, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 6, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 7, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 7, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 7, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 7, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 7, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 8, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 8, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 8, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 8, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 9, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 9, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 9, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 9, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 10, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 10, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 10, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 10, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 10, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 11, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 11, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 11, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 11, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 12, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 12, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2016, 12, 18)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nyårsdagen; Söndag"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2017, 5, 25)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2017, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2017, 6, 23)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2017, 6, 24)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2017, 11, 4)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Julafton; Söndag"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2017, 12, 31)?, "Nyårsafton; Söndag"), + (NaiveDate::from_ymd_res(2017, 1, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 1, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 1, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 1, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 2, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 2, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 2, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 2, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 3, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 3, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 3, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 3, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 4, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 4, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 4, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 4, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 5, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 5, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 5, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 5, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 6, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 6, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 7, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 7, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 7, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 7, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 7, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 8, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 8, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 8, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 8, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 9, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 9, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 9, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 9, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 10, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 10, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 10, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 10, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 10, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 11, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 11, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 11, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 11, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 12, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 12, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2017, 12, 17)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2018, 5, 10)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2018, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2018, 6, 22)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2018, 6, 23)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2018, 11, 3)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2018, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2018, 1, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 1, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 1, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 1, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 2, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 2, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 2, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 2, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 3, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 3, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 3, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 3, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 4, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 4, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 4, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 5, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 5, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 5, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 6, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 6, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 6, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 6, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 7, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 7, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 7, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 7, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 7, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 8, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 8, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 8, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 8, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 9, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 9, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 9, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 9, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 9, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 10, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 10, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 10, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 10, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 11, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 11, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 11, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 11, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 12, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 12, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 12, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 12, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2018, 12, 30)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nyårsdagen"), + ( + NaiveDate::from_ymd_res(2019, 1, 6)?, + "Söndag; Trettondedag jul", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2019, 5, 30)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2019, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2019, 6, 21)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2019, 6, 22)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2019, 11, 2)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2019, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2019, 1, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 1, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 1, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 2, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 2, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 2, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 2, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 3, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 3, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 3, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 3, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 3, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 4, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 4, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 5, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 5, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 5, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 5, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 6, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 6, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 6, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 6, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 7, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 7, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 7, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 7, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 8, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 8, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 8, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 9, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 9, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 9, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 9, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 9, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 10, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 10, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 10, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 10, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 11, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 11, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 11, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 11, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 12, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 12, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 12, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 12, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2019, 12, 29)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2020, 5, 21)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2020, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2020, 6, 19)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2020, 6, 20)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2020, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2020, 1, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 1, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 1, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 2, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 2, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 2, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 2, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 3, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 3, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 3, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 3, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 4, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 4, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 5, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 5, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 5, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 6, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 6, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 6, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 6, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 7, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 7, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 7, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 7, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 8, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 8, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 8, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 8, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 8, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 9, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 9, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 9, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 9, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 10, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 10, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 10, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 10, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 11, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 11, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 11, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 11, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 12, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 12, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 12, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2020, 12, 27)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2021, 5, 13)?, + "Kristi himmelsfärdsdag", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 6)?, + "Sveriges nationaldag; Söndag", + ), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2021, 6, 25)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2021, 6, 26)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2021, 11, 6)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Juldagen"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Annandag jul; Söndag", + ), + (NaiveDate::from_ymd_res(2021, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2021, 1, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 1, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 1, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 1, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 1, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 2, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 2, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 2, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 2, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 3, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 3, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 3, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 3, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 4, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 4, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 4, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 5, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 5, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 5, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 6, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 6, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 6, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 7, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 7, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 7, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 7, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 8, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 8, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 8, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 8, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 9, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 9, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 9, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 9, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 10, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 10, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 10, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 10, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 11, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 11, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 11, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 11, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 12, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 12, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2021, 12, 19)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Första maj; Söndag"), + ( + NaiveDate::from_ymd_res(2022, 5, 26)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2022, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2022, 6, 24)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2022, 6, 25)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2022, 11, 5)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Juldagen; Söndag"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2022, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 1, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 1, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 1, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 1, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 2, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 2, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 2, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 2, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 3, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 3, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 3, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 3, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 4, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 4, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 4, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 5, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 5, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 5, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 5, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 6, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 6, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 6, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 7, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 7, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 7, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 7, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 8, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 8, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 8, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 8, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 9, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 9, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 9, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 9, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 10, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 10, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 10, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 10, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 10, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 11, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 11, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 11, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 11, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 12, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 12, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2022, 12, 18)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Nyårsdagen; Söndag"), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2023, 5, 18)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2023, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2023, 6, 23)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2023, 6, 24)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2023, 11, 4)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Julafton; Söndag"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2023, 12, 31)?, "Nyårsafton; Söndag"), + (NaiveDate::from_ymd_res(2023, 1, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 1, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 1, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 1, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 2, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 2, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 2, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 2, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 3, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 3, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 3, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 3, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 4, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 4, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 4, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 4, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 5, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 5, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 5, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 6, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 6, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 6, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 6, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 7, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 7, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 7, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 7, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 7, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 8, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 8, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 8, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 8, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 9, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 9, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 9, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 9, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 10, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 10, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 10, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 10, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 10, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 11, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 11, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 11, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 11, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 12, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 12, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2023, 12, 17)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2024, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2024, 6, 21)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2024, 6, 22)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2024, 11, 2)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2024, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2024, 1, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 1, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 1, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 1, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 2, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 2, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 2, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 2, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 3, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 3, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 3, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 3, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 4, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 4, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 4, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 4, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 5, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 5, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 5, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 6, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 6, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 6, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 6, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 7, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 7, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 7, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 7, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 8, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 8, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 8, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 8, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 9, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 9, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 9, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 9, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 9, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 10, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 10, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 10, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 10, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 11, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 11, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 11, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 11, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 12, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 12, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 12, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 12, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2024, 12, 29)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2025, 5, 29)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2025, 6, 20)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2025, 6, 21)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2025, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2025, 1, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 1, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 1, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 1, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 2, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 2, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 2, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 2, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 3, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 3, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 3, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 3, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 3, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 4, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 4, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 4, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 5, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 5, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 5, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 5, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 6, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 6, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 6, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 6, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 7, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 7, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 7, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 7, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 8, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 8, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 8, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 8, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 8, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 9, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 9, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 9, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 9, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 10, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 10, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 10, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 10, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 11, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 11, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 11, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 11, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 11, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 12, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 12, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 12, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2025, 12, 28)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2026, 5, 14)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2026, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2026, 6, 19)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2026, 6, 20)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2026, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2026, 1, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 1, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 1, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 1, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 2, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 2, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 2, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 2, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 3, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 3, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 3, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 3, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 3, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 4, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 4, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 4, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 5, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 5, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 5, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 5, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 6, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 6, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 6, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 6, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 7, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 7, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 7, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 7, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 8, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 8, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 8, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 8, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 8, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 9, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 9, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 9, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 9, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 10, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 10, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 10, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 10, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 11, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 11, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 11, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 11, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 12, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 12, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 12, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2026, 12, 27)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2027, 5, 6)?, + "Kristi himmelsfärdsdag", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "Sveriges nationaldag; Söndag", + ), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2027, 6, 25)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2027, 6, 26)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2027, 11, 6)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Juldagen"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Annandag jul; Söndag", + ), + (NaiveDate::from_ymd_res(2027, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2027, 1, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 1, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 1, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 1, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 1, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 2, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 2, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 2, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 2, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 3, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 3, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 4, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 4, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 4, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 4, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 5, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 5, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 5, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 6, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 6, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 6, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 7, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 7, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 7, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 7, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 8, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 8, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 8, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 8, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 9, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 9, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 9, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 9, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 10, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 10, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 10, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 10, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 11, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 11, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 11, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 11, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 12, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 12, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2027, 12, 19)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2028, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2028, 6, 23)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2028, 6, 24)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2028, 11, 4)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Julafton; Söndag"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2028, 12, 31)?, "Nyårsafton; Söndag"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 1, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 1, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 1, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 1, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 2, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 2, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 2, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 2, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 3, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 3, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 3, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 3, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 4, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 4, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 4, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 4, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 5, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 5, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 5, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 6, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 6, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 6, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 7, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 7, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 7, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 7, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 7, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 8, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 8, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 8, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 8, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 9, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 9, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 9, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 9, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 10, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 10, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 10, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 10, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 10, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 11, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 11, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 11, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 11, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 12, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 12, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2028, 12, 17)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Nyårsdagen"), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Trettondedag jul"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2029, 5, 10)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2029, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2029, 6, 22)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2029, 6, 23)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2029, 11, 3)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2029, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2029, 1, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 1, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 1, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 1, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 2, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 2, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 2, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 2, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 3, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 3, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 3, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 3, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 4, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 4, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 4, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 4, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 5, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 5, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 5, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 6, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 6, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 6, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 6, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 7, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 7, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 7, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 7, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 7, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 8, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 8, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 8, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 8, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 9, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 9, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 9, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 9, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 9, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 10, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 10, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 10, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 10, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 11, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 11, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 11, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 11, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 12, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 12, 9)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 12, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 12, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2029, 12, 30)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nyårsdagen"), + ( + NaiveDate::from_ymd_res(2030, 1, 6)?, + "Söndag; Trettondedag jul", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Långfredagen"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Påskdagen; Söndag"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Annandag påsk"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Första maj"), + ( + NaiveDate::from_ymd_res(2030, 5, 30)?, + "Kristi himmelsfärdsdag", + ), + (NaiveDate::from_ymd_res(2030, 6, 6)?, "Sveriges nationaldag"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pingstdagen; Söndag"), + (NaiveDate::from_ymd_res(2030, 6, 21)?, "Midsommarafton"), + (NaiveDate::from_ymd_res(2030, 6, 22)?, "Midsommardagen"), + (NaiveDate::from_ymd_res(2030, 11, 2)?, "Alla helgons dag"), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Julafton"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Juldagen"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Annandag jul"), + (NaiveDate::from_ymd_res(2030, 12, 31)?, "Nyårsafton"), + (NaiveDate::from_ymd_res(2030, 1, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 1, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 1, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 2, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 2, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 2, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 2, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 3, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 3, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 3, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 3, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 3, 31)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 4, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 4, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 5, 5)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 5, 12)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 5, 19)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 5, 26)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 6, 2)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 6, 16)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 6, 23)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 6, 30)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 7, 7)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 7, 14)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 7, 21)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 7, 28)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 8, 4)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 8, 11)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 8, 18)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 8, 25)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 9, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 9, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 9, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 9, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 9, 29)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 10, 6)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 10, 13)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 10, 20)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 10, 27)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 11, 3)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 11, 10)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 11, 17)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 11, 24)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 12, 1)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 12, 8)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 12, 15)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 12, 22)?, "Söndag"), + (NaiveDate::from_ymd_res(2030, 12, 29)?, "Söndag"), + ], + &mut map, + Country::SE, + "Sweden", + ); + + Ok(map) +} diff --git a/src/data/sg.rs b/src/data/sg.rs new file mode 100644 index 0000000..ab5ffd8 --- /dev/null +++ b/src/data/sg.rs @@ -0,0 +1,980 @@ +//! Singapore +use super::*; + +/// Generate holiday map for Singapore. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 2, 5)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 6)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Hari Raya Haji (estimated)", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2000, 5, 18)?, + "Vesak Day (estimated)", + ), + (NaiveDate::from_ymd_res(2000, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2000, 10, 25)?, "Deepavali"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2000, 2, 7)?, + "Chinese New Year (estimated) (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 1, 24)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2001, 1, 25)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2001, 3, 6)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 5, 7)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2001, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2001, 11, 14)?, "Deepavali"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Hari Raya Puasa (observed)", + ), + (NaiveDate::from_ymd_res(2001, 11, 3)?, "Polling Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2002, 2, 13)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2002, 12, 6)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2002, 2, 23)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 5, 26)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2002, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2002, 11, 3)?, "Deepavali"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2002, 5, 27)?, + "Vesak Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 4)?, + "Deepavali (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 2, 1)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2003, 2, 2)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 5, 15)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2003, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2003, 10, 23)?, "Deepavali"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2003, 2, 3)?, + "Chinese New Year (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 1, 22)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2004, 1, 23)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 6, 2)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2004, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2004, 11, 11)?, "Deepavali"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "Hari Raya Haji (observed)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "Hari Raya Puasa (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2005, 2, 10)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2005, 5, 22)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2005, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Deepavali"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Labour Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 23)?, + "Vesak Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2006, 1, 30)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2006, 1, 31)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 5, 12)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2006, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2006, 10, 21)?, "Deepavali"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 5, 6)?, "Polling Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2007, 2, 20)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 5, 31)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2007, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2007, 11, 8)?, "Deepavali"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "Hari Raya Haji (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 2, 7)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2008, 2, 8)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 5, 19)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2008, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2008, 10, 27)?, "Deepavali"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2009, 1, 27)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 5, 9)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2009, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2009, 11, 15)?, "Deepavali"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2009, 8, 10)?, + "National Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "Hari Raya Puasa (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 16)?, + "Deepavali (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 2, 14)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 5, 28)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2010, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2010, 11, 5)?, "Deepavali"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 2, 16)?, + "Chinese New Year (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 2, 3)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2011, 2, 4)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2011, 5, 17)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2011, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2011, 10, 26)?, "Deepavali"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Labour Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "Hari Raya Haji (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 5, 7)?, "Polling Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2012, 1, 23)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2012, 1, 24)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 5, 5)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2012, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2012, 11, 13)?, "Deepavali"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "Hari Raya Puasa (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 2, 10)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 5, 24)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2013, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2013, 11, 2)?, "Deepavali"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2013, 2, 12)?, + "Chinese New Year (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 1, 31)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2014, 2, 1)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2014, 10, 5)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 5, 13)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2014, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2014, 10, 22)?, "Deepavali"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "Hari Raya Haji (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 2, 19)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2015, 2, 20)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 6, 1)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2015, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2015, 11, 10)?, "Deepavali"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2015, 8, 10)?, + "National Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 8, 7)?, "SG50 Public Holiday"), + (NaiveDate::from_ymd_res(2015, 9, 11)?, "Polling Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2016, 5, 21)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2016, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2016, 10, 29)?, "Deepavali"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Labour Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2017, 1, 28)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2017, 1, 29)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 5, 10)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2017, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2017, 10, 18)?, "Deepavali"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 30)?, + "Chinese New Year (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "Hari Raya Puasa (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 2, 16)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2018, 2, 17)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 5, 29)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2018, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Deepavali"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2019, 2, 6)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 5, 19)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2019, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2019, 10, 27)?, "Deepavali"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2019, 5, 20)?, + "Vesak Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "Hari Raya Haji (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 28)?, + "Deepavali (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 5, 7)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2020, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2020, 11, 14)?, "Deepavali"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 27)?, + "Chinese New Year (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "Hari Raya Puasa (observed)", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 10)?, + "National Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 7, 10)?, "Polling Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2021, 2, 13)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 5, 26)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2021, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2021, 11, 4)?, "Deepavali"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 2, 1)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2022, 2, 2)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2022, 5, 15)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2022, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2022, 10, 24)?, "Deepavali"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Labour Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 16)?, + "Vesak Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "Hari Raya Haji (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2023, 1, 22)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2023, 1, 23)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 6, 2)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2023, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2023, 11, 12)?, "Deepavali"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 24)?, + "Chinese New Year (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 13)?, + "Deepavali (observed)", + ), + (NaiveDate::from_ymd_res(2023, 9, 1)?, "Polling Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 2, 10)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2024, 2, 11)?, "Chinese New Year"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Hari Raya Puasa"), + (NaiveDate::from_ymd_res(2024, 6, 17)?, "Hari Raya Haji"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 5, 22)?, "Vesak Day"), + (NaiveDate::from_ymd_res(2024, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Deepavali"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2024, 2, 12)?, + "Chinese New Year (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 29)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 30)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Hari Raya Haji (estimated)", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2025, 5, 11)?, + "Vesak Day (estimated)", + ), + (NaiveDate::from_ymd_res(2025, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2025, 11, 18)?, "Deepavali"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Hari Raya Puasa (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 12)?, + "Vesak Day (estimated) (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2026, 2, 17)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 18)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Hari Raya Haji (estimated)", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2026, 5, 31)?, + "Vesak Day (estimated)", + ), + (NaiveDate::from_ymd_res(2026, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2026, 11, 7)?, "Deepavali"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2026, 6, 1)?, + "Vesak Day (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 10)?, + "National Day (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 2, 6)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 7)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Hari Raya Haji (estimated)", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2027, 5, 20)?, + "Vesak Day (estimated)", + ), + (NaiveDate::from_ymd_res(2027, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2027, 10, 27)?, "Deepavali"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "Chinese New Year (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Hari Raya Haji (estimated) (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 26)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 27)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Hari Raya Haji (estimated)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "Vesak Day (estimated)", + ), + (NaiveDate::from_ymd_res(2028, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2028, 11, 14)?, "Deepavali"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2029, 2, 13)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Chinese New Year (estimated); Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Hari Raya Haji (estimated)", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2029, 5, 27)?, + "Vesak Day (estimated)", + ), + (NaiveDate::from_ymd_res(2029, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2029, 11, 4)?, "Deepavali"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2029, 5, 28)?, + "Vesak Day (estimated) (observed)", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 5)?, + "Deepavali (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2030, 2, 3)?, + "Chinese New Year (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Chinese New Year (estimated); Hari Raya Puasa (estimated)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Hari Raya Haji (estimated)", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2030, 5, 16)?, + "Vesak Day (estimated)", + ), + (NaiveDate::from_ymd_res(2030, 8, 9)?, "National Day"), + (NaiveDate::from_ymd_res(2030, 10, 25)?, "Deepavali"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "Chinese New Year (estimated) (observed)", + ), + ], + &mut map, + Country::SG, + "Singapore", + ); + + Ok(map) +} diff --git a/src/data/si.rs b/src/data/si.rs new file mode 100644 index 0000000..8c5fea2 --- /dev/null +++ b/src/data/si.rs @@ -0,0 +1,1187 @@ +//! Slovenia +use super::*; + +/// Generate holiday map for Slovenia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2000, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2000, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2000, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2000, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2000, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2000, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2001, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2001, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2001, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2001, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2001, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2001, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2001, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2002, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2002, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2002, 4, 1)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2002, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2002, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2002, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2002, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2002, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2003, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2003, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2003, 4, 21)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2003, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2003, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2003, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2003, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2004, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2004, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2004, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2004, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2004, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2004, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2004, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2005, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2005, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2005, 3, 28)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2005, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2005, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2005, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2005, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2005, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2006, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2006, 4, 17)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2006, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2006, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2006, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2006, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2006, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2007, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2007, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2007, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2007, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2007, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2007, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2008, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2008, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2008, 3, 24)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2008, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2008, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2008, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2008, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2009, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2009, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2009, 4, 13)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2009, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2009, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2009, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2009, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2010, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2010, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2010, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2010, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2010, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2010, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2010, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2011, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2011, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2011, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2011, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2011, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2011, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2011, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2012, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2012, 4, 9)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2012, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2012, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2012, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2012, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2012, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2013, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2013, 4, 1)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2013, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2013, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2013, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2013, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2013, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2014, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2014, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2014, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2014, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2014, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2015, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2015, 4, 6)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2015, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2015, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2015, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2015, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2016, 3, 28)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2016, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2016, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2016, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2016, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2016, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2017, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2017, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2017, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2017, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2017, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2018, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2018, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2018, 4, 2)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2018, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2018, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2018, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2018, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2019, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2019, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2019, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2019, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2019, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2019, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2020, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2020, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2020, 4, 13)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2020, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2020, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2020, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2020, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2021, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2021, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2021, 4, 5)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2021, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2021, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2021, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2022, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2022, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2022, 4, 18)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2022, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2022, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2022, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2023, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2023, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2023, 4, 10)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2023, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2023, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2023, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2023, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + (NaiveDate::from_ymd_res(2023, 8, 14)?, "dan solidarnosti"), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2024, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2024, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2024, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2024, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2024, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2024, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2025, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2025, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2025, 4, 21)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2025, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2025, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2025, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2026, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2026, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2026, 4, 6)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2026, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2026, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2026, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2026, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2027, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2027, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2027, 3, 29)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2027, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2027, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2027, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2027, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2028, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2028, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2028, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2028, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2028, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2028, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2029, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2029, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2029, 4, 2)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2029, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2029, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2029, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2029, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "novo leto"), + (NaiveDate::from_ymd_res(2030, 1, 2)?, "novo leto"), + (NaiveDate::from_ymd_res(2030, 2, 8)?, "Prešernov dan"), + ( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Velikonočni ponedeljek", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 27)?, + "dan upora proti okupatorju", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "praznik dela"), + (NaiveDate::from_ymd_res(2030, 5, 2)?, "praznik dela"), + (NaiveDate::from_ymd_res(2030, 6, 25)?, "dan državnosti"), + ( + NaiveDate::from_ymd_res(2030, 8, 15)?, + "Marijino vnebovzetje", + ), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "dan reformacije"), + ( + NaiveDate::from_ymd_res(2030, 11, 1)?, + "dan spomina na mrtve", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Božič"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "dan samostojnosti in enotnosti", + ), + ], + &mut map, + Country::SI, + "Slovenia", + ); + + Ok(map) +} diff --git a/src/data/sk.rs b/src/data/sk.rs new file mode 100644 index 0000000..42abba8 --- /dev/null +++ b/src/data/sk.rs @@ -0,0 +1,1810 @@ +//! Slovakia +use super::*; + +/// Generate holiday map for Slovakia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2000, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 1)?, + "Sviatok Všetkých svätých", + ), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2000, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2001, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2001, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2001, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2002, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2002, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2002, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2002, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2003, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2003, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2003, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2004, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2004, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2004, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2005, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2005, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2005, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2006, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2006, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2007, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2007, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2007, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2008, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2008, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2008, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2009, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2009, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2010, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2010, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2011, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2011, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2012, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2012, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2013, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2013, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2014, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2014, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2014, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2015, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2015, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2016, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2016, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2017, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2018, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Druhý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 30)?, + "100. výročie prijatia Deklarácie slovenského národa", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2019, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2019, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2020, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2020, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2021, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2022, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2022, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2023, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2023, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2024, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2024, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2024, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2025, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2025, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2026, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2026, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2026, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2026, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2027, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2027, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2027, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2028, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2028, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2029, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2029, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2029, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 1)?, + "Deň vzniku Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2030, 1, 6)?, + "Zjavenie Pána (Traja králi a vianočný sviatok pravoslávnych kresťanov)", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Veľký piatok"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Veľkonočný pondelok"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Sviatok práce"), + ( + NaiveDate::from_ymd_res(2030, 5, 8)?, + "Deň víťazstva nad fašizmom", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 5)?, + "Sviatok svätého Cyrila a svätého Metoda", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 29)?, + "Výročie Slovenského národného povstania", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 1)?, + "Deň Ústavy Slovenskej republiky", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 15)?, + "Sedembolestná Panna Mária", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 1)?, + "Sviatok Všetkých svätých", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 17)?, + "Deň boja za slobodu a demokraciu", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Štedrý deň"), + ( + NaiveDate::from_ymd_res(2030, 12, 25)?, + "Prvý sviatok vianočný", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Druhý sviatok vianočný", + ), + ], + &mut map, + Country::SK, + "Slovakia", + ); + + Ok(map) +} diff --git a/src/data/sz.rs b/src/data/sz.rs new file mode 100644 index 0000000..7397e7d --- /dev/null +++ b/src/data/sz.rs @@ -0,0 +1,805 @@ +//! Swaziland +use super::*; + +/// Generate holiday map for Swaziland. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 6, 1)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2000, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2000, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2000, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2000, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + (NaiveDate::from_ymd_res(2000, 1, 3)?, "Y2K changeover"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 24)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2001, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2001, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2001, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2001, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2002, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2002, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2002, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2002, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2003, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2003, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2003, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2003, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 20)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2004, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2004, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2004, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2004, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2005, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2005, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2005, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2005, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2006, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2006, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2006, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2006, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2007, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2007, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2007, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2007, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Ascension Day; Worker's Day", + ), + (NaiveDate::from_ymd_res(2008, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2008, 4, 25)?, "National Flag Day"), + ( + NaiveDate::from_ymd_res(2008, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2008, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2009, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2009, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2009, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 13)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2010, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2010, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2010, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2010, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Easter Monday; National Flag Day", + ), + (NaiveDate::from_ymd_res(2011, 6, 2)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2011, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2011, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2011, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 17)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2012, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2012, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2012, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2012, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2013, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2013, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2013, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2013, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2014, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2014, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2014, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 14)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2015, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2015, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2015, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2015, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 5)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2016, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2016, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2016, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2016, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2017, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2017, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2017, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2017, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 10)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2018, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2018, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2018, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2018, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2019, 4, 19)?, + "Good Friday; King's Birthday", + ), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 30)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2019, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2019, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2019, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 21)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2020, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2020, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2020, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2021, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2021, 4, 25)?, "National Flag Day"), + ( + NaiveDate::from_ymd_res(2021, 4, 26)?, + "National Flag Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2021, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 5, 26)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2022, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Worker's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2022, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 5, 18)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2023, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2023, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2023, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2023, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 5, 9)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2024, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2024, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2024, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2024, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 29)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2025, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2025, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2025, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 5, 14)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2026, 4, 19)?, "King's Birthday"), + ( + NaiveDate::from_ymd_res(2026, 4, 20)?, + "King's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2026, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2026, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2026, 9, 6)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2026, 9, 7)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 5, 6)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2027, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2027, 4, 25)?, "National Flag Day"), + ( + NaiveDate::from_ymd_res(2027, 4, 26)?, + "National Flag Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2027, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2027, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2028, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2028, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2028, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2028, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 5, 10)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2029, 4, 19)?, "King's Birthday"), + (NaiveDate::from_ymd_res(2029, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2029, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 23)?, + "Birthday of Late King Sobhuza (observed)", + ), + (NaiveDate::from_ymd_res(2029, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2030, 4, 19)?, + "Good Friday; King's Birthday", + ), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 5, 30)?, "Ascension Day"), + (NaiveDate::from_ymd_res(2030, 4, 25)?, "National Flag Day"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Worker's Day"), + ( + NaiveDate::from_ymd_res(2030, 7, 22)?, + "Birthday of Late King Sobhuza", + ), + (NaiveDate::from_ymd_res(2030, 9, 6)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::SZ, + "Swaziland", + ); + + Ok(map) +} diff --git a/src/data/tn.rs b/src/data/tn.rs new file mode 100644 index 0000000..97f4a3f --- /dev/null +++ b/src/data/tn.rs @@ -0,0 +1,1433 @@ +//! Tunisia +use super::*; + +/// Generate holiday map for Tunisia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2000, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2000, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2000, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2000, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2000, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2000, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2000, 1, 8)?, "(تقدير) عيد الفطر"), + (NaiveDate::from_ymd_res(2000, 12, 27)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2000, 1, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2000, 3, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2000, 3, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2000, 3, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2001, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2001, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2001, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2001, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2001, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2001, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2001, 3, 4)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2001, 3, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2002, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2002, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2002, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2002, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2002, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2002, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2002, 12, 5)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2002, 12, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2002, 2, 21)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2002, 2, 22)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2002, 2, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2003, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2003, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2003, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2003, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2003, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2003, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2003, 11, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2003, 2, 10)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2003, 2, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2004, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2004, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "عيد الشهداء"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "(تقدير) عيد المولد النبوي; عيد العمال", + ), + (NaiveDate::from_ymd_res(2004, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2004, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2004, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2004, 11, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2004, 1, 31)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2004, 2, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 3)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 21)?, + "(تقدير) رأس السنة الهجرية", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2005, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2005, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2005, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2005, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2005, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2005, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2005, 11, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2005, 1, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 21)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2006, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2006, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2006, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2006, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2006, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2006, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2006, 10, 24)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2006, 1, 9)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2006, 12, 30)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "(تقدير) عيد الأضحى"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2006, 1, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 31)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 10)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "(تقدير) عطلة عيد الأضحى; رأس السنة الميلادية", + ), + (NaiveDate::from_ymd_res(2007, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2007, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2007, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2007, 8, 13)?, "عيد المرأة"), + ( + NaiveDate::from_ymd_res(2007, 10, 15)?, + "(تقدير) عطلة عيد الفطر; عيد الجلاء", + ), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2007, 10, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2007, 12, 19)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2007, 12, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 20)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 31)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2008, 1, 14)?, "عيد الثورة والشباب"), + ( + NaiveDate::from_ymd_res(2008, 3, 20)?, + "(تقدير) عيد المولد النبوي; عيد الإستقلال", + ), + (NaiveDate::from_ymd_res(2008, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2008, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2008, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2008, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2008, 10, 2)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2008, 12, 7)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2008, 12, 9)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 10)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 29)?, + "(تقدير) رأس السنة الهجرية", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2009, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2009, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2009, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2009, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2009, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2009, 9, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2009, 9, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2009, 11, 26)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2009, 11, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 18)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2010, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2010, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2010, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2010, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2010, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2010, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2010, 9, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2010, 9, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2010, 11, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2010, 11, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 26)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2011, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2011, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2011, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2011, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2011, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2011, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2011, 8, 30)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2011, 8, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2011, 9, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2011, 11, 5)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2011, 11, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2012, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2012, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2012, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2012, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2012, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2012, 8, 20)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2012, 10, 25)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2012, 10, 27)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 15)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2013, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2013, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2013, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2013, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2013, 8, 13)?, "عيد المرأة"), + ( + NaiveDate::from_ymd_res(2013, 10, 15)?, + "(تقدير) عيد الأضحى; عيد الجلاء", + ), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2013, 8, 9)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "(تقدير) يوم عرفة"), + ( + NaiveDate::from_ymd_res(2013, 10, 16)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 4)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2014, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2014, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2014, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2014, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2014, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2014, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2014, 7, 29)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 30)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2014, 10, 3)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2014, 10, 5)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2015, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2015, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2015, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2015, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2015, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2015, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 19)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2015, 9, 22)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2015, 9, 23)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2015, 9, 24)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 9, 25)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 23)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2016, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2016, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2016, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2016, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2016, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2016, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2016, 7, 7)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 8)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2016, 9, 10)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2016, 9, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2016, 9, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 13)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 2)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 11)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2017, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2017, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2017, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2017, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2017, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2017, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2017, 6, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2017, 8, 31)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2017, 9, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 3)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 21)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 30)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2018, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2018, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2018, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2018, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2018, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2018, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2018, 6, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 17)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2018, 8, 20)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2018, 8, 21)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2018, 8, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 23)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 11)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 20)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2019, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2019, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2019, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2019, 7, 25)?, "عيد الجمهورية"), + ( + NaiveDate::from_ymd_res(2019, 8, 13)?, + "(تقدير) عطلة عيد الأضحى; عيد المرأة", + ), + (NaiveDate::from_ymd_res(2019, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2019, 6, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2019, 8, 10)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 31)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 9)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2020, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2020, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2020, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2020, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2020, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2020, 5, 25)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 26)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2020, 7, 30)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2020, 8, 1)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 2)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 20)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 29)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2021, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2021, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2021, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2021, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2021, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2021, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2021, 7, 19)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 22)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 9)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2022, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2022, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2022, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2022, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2022, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2022, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 4)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2022, 7, 8)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2022, 7, 10)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 30)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 8)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2023, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2023, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2023, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2023, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2023, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2023, 4, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 23)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2023, 6, 27)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 30)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 19)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 27)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2024, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2024, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2024, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2024, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2024, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2024, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 12)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2024, 6, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 7)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 15)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2025, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2025, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2025, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2025, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2025, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2025, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2025, 3, 30)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 1)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2025, 6, 5)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2025, 6, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 8)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 26)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2025, 9, 4)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2026, 1, 14)?, "عيد الثورة والشباب"), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "(تقدير) عيد الفطر; عيد الإستقلال", + ), + (NaiveDate::from_ymd_res(2026, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2026, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2026, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2026, 10, 15)?, "عيد الجلاء"), + ( + NaiveDate::from_ymd_res(2026, 3, 21)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 22)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2026, 5, 26)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2026, 5, 27)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2026, 5, 28)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 29)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 16)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2027, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2027, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2027, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2027, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2027, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2027, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2027, 3, 9)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2027, 3, 10)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 11)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2027, 5, 15)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 18)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 6)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 14)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2028, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2028, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2028, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2028, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2028, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2028, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2028, 2, 26)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2028, 2, 27)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2028, 5, 4)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2028, 5, 6)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 7)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 25)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 3)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2029, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2029, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2029, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2029, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2029, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2029, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2029, 4, 23)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2029, 4, 24)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2029, 4, 25)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 26)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 14)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "رأس السنة الميلادية"), + (NaiveDate::from_ymd_res(2030, 1, 14)?, "عيد الثورة والشباب"), + (NaiveDate::from_ymd_res(2030, 3, 20)?, "عيد الإستقلال"), + (NaiveDate::from_ymd_res(2030, 4, 9)?, "عيد الشهداء"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "عيد العمال"), + (NaiveDate::from_ymd_res(2030, 7, 25)?, "عيد الجمهورية"), + (NaiveDate::from_ymd_res(2030, 8, 13)?, "عيد المرأة"), + (NaiveDate::from_ymd_res(2030, 10, 15)?, "عيد الجلاء"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "(تقدير) عيد الفطر"), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "(تقدير) عطلة عيد الفطر", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "(تقدير) عطلة عيد الفطر", + ), + (NaiveDate::from_ymd_res(2030, 4, 12)?, "(تقدير) يوم عرفة"), + (NaiveDate::from_ymd_res(2030, 4, 13)?, "(تقدير) عيد الأضحى"), + ( + NaiveDate::from_ymd_res(2030, 4, 14)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "(تقدير) عطلة عيد الأضحى", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 3)?, + "(تقدير) رأس السنة الهجرية", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 13)?, + "(تقدير) عيد المولد النبوي", + ), + ], + &mut map, + Country::TN, + "Tunisia", + ); + + Ok(map) +} diff --git a/src/data/tr.rs b/src/data/tr.rs new file mode 100644 index 0000000..e9fab0b --- /dev/null +++ b/src/data/tr.rs @@ -0,0 +1,1033 @@ +//! Turkey +use super::*; + +/// Generate holiday map for Turkey. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2000, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2000, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2000, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2000, 1, 8)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2000, 12, 27)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2000, 1, 9)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2000, 12, 28)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2000, 1, 10)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2000, 12, 29)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2000, 3, 16)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2000, 3, 17)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2000, 3, 18)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2000, 3, 19)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2001, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2001, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2001, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2001, 12, 16)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2001, 12, 17)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2001, 12, 18)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2001, 3, 6)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2001, 3, 7)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2001, 3, 8)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2002, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2002, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2002, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2002, 12, 5)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2002, 12, 6)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2002, 12, 7)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2002, 2, 22)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2002, 2, 23)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2002, 2, 24)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2002, 2, 25)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2003, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2003, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2003, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2003, 11, 25)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2003, 11, 26)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2003, 11, 27)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2003, 2, 11)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2003, 2, 13)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2003, 2, 14)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2004, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2004, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2004, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2004, 11, 14)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2004, 11, 15)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2004, 11, 16)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2004, 2, 1)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2004, 2, 2)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2004, 2, 3)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2004, 2, 4)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2005, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2005, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2005, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2005, 11, 3)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2005, 11, 4)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2005, 11, 5)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2005, 1, 21)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2005, 1, 22)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2005, 1, 23)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2006, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2006, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2006, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2006, 10, 25)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2006, 12, 31)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2006, 1, 11)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2006, 1, 12)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2006, 1, 13)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "Kurban Bayramı; Yılbaşı", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2007, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2007, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2007, 10, 12)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2007, 10, 14)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2007, 12, 20)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2007, 12, 21)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2007, 1, 2)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2007, 12, 22)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2007, 1, 3)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2007, 12, 23)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2008, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2008, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2008, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2008, 9, 30)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2008, 10, 1)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2008, 10, 2)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2008, 12, 9)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2008, 12, 10)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2008, 12, 11)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2009, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2009, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2009, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2009, 9, 20)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2009, 9, 22)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2009, 11, 28)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2009, 11, 29)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2009, 11, 30)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2010, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2010, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2010, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2010, 9, 9)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2010, 9, 11)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2010, 11, 18)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2010, 11, 19)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2011, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 30)?, + "Ramazan Bayramı; Zafer Bayramı", + ), + (NaiveDate::from_ymd_res(2011, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2011, 8, 31)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2011, 9, 1)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2011, 11, 7)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2011, 11, 8)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2011, 11, 9)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2012, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2012, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2012, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2012, 8, 20)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2012, 8, 21)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2012, 10, 25)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2012, 10, 27)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2012, 10, 28)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2013, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2013, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2013, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2013, 8, 8)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2013, 8, 9)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2013, 8, 10)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2013, 10, 16)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2013, 10, 17)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2013, 10, 18)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2014, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2014, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2014, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2014, 7, 29)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2014, 7, 30)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2014, 10, 5)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2014, 10, 6)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2014, 10, 7)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2015, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2015, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2015, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2015, 7, 17)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2015, 7, 18)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2015, 7, 19)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2015, 9, 25)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2015, 9, 26)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2015, 9, 27)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2016, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + (NaiveDate::from_ymd_res(2016, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2016, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2016, 7, 5)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2016, 7, 7)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2016, 9, 13)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2016, 9, 14)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2016, 9, 15)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2017, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2017, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2017, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2017, 6, 25)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2017, 6, 26)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2017, 6, 27)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2017, 9, 1)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2017, 9, 2)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2017, 9, 3)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2017, 9, 4)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2018, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2018, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2018, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2018, 6, 16)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2018, 6, 17)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2018, 8, 21)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2018, 8, 22)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2018, 8, 23)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2018, 8, 24)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2019, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2019, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2019, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2019, 6, 4)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2019, 6, 6)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2019, 8, 12)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2019, 8, 13)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2019, 8, 14)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2020, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2020, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2020, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2020, 5, 26)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2020, 8, 1)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2020, 8, 2)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2020, 8, 3)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2021, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2021, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2021, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2021, 5, 14)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2021, 5, 15)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2021, 7, 21)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2021, 7, 22)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2021, 7, 23)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2022, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2022, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2022, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2022, 5, 4)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2022, 7, 10)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2022, 7, 11)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2022, 7, 12)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2023, 4, 23)?, + "Ramazan Bayramı; Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2023, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2023, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2023, 4, 22)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2023, 6, 29)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2023, 6, 30)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2023, 7, 1)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2024, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2024, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2024, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2024, 4, 11)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2024, 4, 12)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2024, 6, 17)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2024, 6, 18)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2024, 6, 19)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2025, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2025, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2025, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2025, 3, 30)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2025, 3, 31)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2025, 4, 1)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2025, 6, 6)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2025, 6, 7)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2025, 6, 9)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2026, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2026, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2026, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2026, 3, 20)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2026, 3, 21)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2026, 3, 22)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2026, 5, 27)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2026, 5, 28)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2026, 5, 29)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2026, 5, 30)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2027, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı; Kurban Bayramı", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2027, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2027, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2027, 3, 9)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2027, 3, 10)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2027, 3, 11)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2027, 5, 17)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2027, 5, 18)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2028, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2028, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2028, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2028, 2, 26)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2028, 2, 27)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2028, 2, 28)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2028, 5, 5)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2028, 5, 6)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2028, 5, 7)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2028, 5, 8)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2029, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2029, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2029, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2029, 2, 15)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2029, 2, 16)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2029, 4, 24)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2029, 4, 25)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2029, 4, 26)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2029, 4, 27)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Yılbaşı"), + ( + NaiveDate::from_ymd_res(2030, 4, 23)?, + "Ulusal Egemenlik ve Çocuk Bayramı", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Emek ve Dayanışma Günü", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 19)?, + "Atatürk'ü Anma, Gençlik ve Spor Bayramı", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 15)?, + "Demokrasi ve Millî Birlik Günü", + ), + (NaiveDate::from_ymd_res(2030, 8, 30)?, "Zafer Bayramı"), + (NaiveDate::from_ymd_res(2030, 10, 29)?, "Cumhuriyet Bayramı"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2030, 2, 5)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2030, 2, 6)?, "Ramazan Bayramı"), + (NaiveDate::from_ymd_res(2030, 4, 13)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2030, 4, 14)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2030, 4, 15)?, "Kurban Bayramı"), + (NaiveDate::from_ymd_res(2030, 4, 16)?, "Kurban Bayramı"), + ], + &mut map, + Country::TR, + "Turkey", + ); + + Ok(map) +} diff --git a/src/data/tw.rs b/src/data/tw.rs new file mode 100644 index 0000000..230b82e --- /dev/null +++ b/src/data/tw.rs @@ -0,0 +1,854 @@ +//! Taiwan +use super::*; + +/// Generate holiday map for Taiwan. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2000, 2, 4)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2000, 2, 5)?, "春節"), + (NaiveDate::from_ymd_res(2000, 2, 6)?, "春節"), + (NaiveDate::from_ymd_res(2000, 2, 7)?, "春節"), + (NaiveDate::from_ymd_res(2000, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2000, 4, 4)?, "清明節"), + (NaiveDate::from_ymd_res(2000, 6, 6)?, "端午節"), + (NaiveDate::from_ymd_res(2000, 9, 12)?, "中秋節"), + (NaiveDate::from_ymd_res(2000, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2001, 1, 23)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2001, 1, 24)?, "春節"), + (NaiveDate::from_ymd_res(2001, 1, 25)?, "春節"), + (NaiveDate::from_ymd_res(2001, 1, 26)?, "春節"), + (NaiveDate::from_ymd_res(2001, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2001, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2001, 6, 25)?, "端午節"), + (NaiveDate::from_ymd_res(2001, 10, 1)?, "中秋節"), + (NaiveDate::from_ymd_res(2001, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2002, 2, 11)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "春節"), + (NaiveDate::from_ymd_res(2002, 2, 13)?, "春節"), + (NaiveDate::from_ymd_res(2002, 2, 14)?, "春節"), + (NaiveDate::from_ymd_res(2002, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2002, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2002, 6, 15)?, "端午節"), + (NaiveDate::from_ymd_res(2002, 9, 21)?, "中秋節"), + (NaiveDate::from_ymd_res(2002, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2003, 1, 31)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2003, 2, 1)?, "春節"), + (NaiveDate::from_ymd_res(2003, 2, 2)?, "春節"), + (NaiveDate::from_ymd_res(2003, 2, 3)?, "春節"), + (NaiveDate::from_ymd_res(2003, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2003, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2003, 6, 4)?, "端午節"), + (NaiveDate::from_ymd_res(2003, 9, 11)?, "中秋節"), + (NaiveDate::from_ymd_res(2003, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2004, 1, 21)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2004, 1, 22)?, "春節"), + (NaiveDate::from_ymd_res(2004, 1, 23)?, "春節"), + (NaiveDate::from_ymd_res(2004, 1, 24)?, "春節"), + (NaiveDate::from_ymd_res(2004, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2004, 4, 4)?, "清明節"), + (NaiveDate::from_ymd_res(2004, 6, 22)?, "端午節"), + (NaiveDate::from_ymd_res(2004, 9, 28)?, "中秋節"), + (NaiveDate::from_ymd_res(2004, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2005, 2, 8)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "春節"), + (NaiveDate::from_ymd_res(2005, 2, 10)?, "春節"), + (NaiveDate::from_ymd_res(2005, 2, 11)?, "春節"), + (NaiveDate::from_ymd_res(2005, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2005, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2005, 6, 11)?, "端午節"), + (NaiveDate::from_ymd_res(2005, 9, 18)?, "中秋節"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2006, 1, 28)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2006, 1, 29)?, "春節"), + (NaiveDate::from_ymd_res(2006, 1, 30)?, "春節"), + (NaiveDate::from_ymd_res(2006, 1, 31)?, "春節"), + (NaiveDate::from_ymd_res(2006, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2006, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2006, 5, 31)?, "端午節"), + (NaiveDate::from_ymd_res(2006, 10, 6)?, "中秋節"), + (NaiveDate::from_ymd_res(2006, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2007, 2, 17)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2007, 2, 18)?, "春節"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "春節"), + (NaiveDate::from_ymd_res(2007, 2, 20)?, "春節"), + (NaiveDate::from_ymd_res(2007, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2007, 6, 19)?, "端午節"), + (NaiveDate::from_ymd_res(2007, 9, 25)?, "中秋節"), + (NaiveDate::from_ymd_res(2007, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2008, 2, 6)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2008, 2, 7)?, "春節"), + (NaiveDate::from_ymd_res(2008, 2, 8)?, "春節"), + (NaiveDate::from_ymd_res(2008, 2, 9)?, "春節"), + (NaiveDate::from_ymd_res(2008, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2008, 4, 4)?, "清明節"), + (NaiveDate::from_ymd_res(2008, 6, 8)?, "端午節"), + (NaiveDate::from_ymd_res(2008, 9, 14)?, "中秋節"), + (NaiveDate::from_ymd_res(2008, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2009, 1, 25)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "春節"), + (NaiveDate::from_ymd_res(2009, 1, 27)?, "春節"), + (NaiveDate::from_ymd_res(2009, 1, 28)?, "春節"), + (NaiveDate::from_ymd_res(2009, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2009, 4, 4)?, "清明節"), + (NaiveDate::from_ymd_res(2009, 5, 28)?, "端午節"), + (NaiveDate::from_ymd_res(2009, 10, 3)?, "中秋節"), + (NaiveDate::from_ymd_res(2009, 10, 10)?, "中華民國國慶日"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2010, 2, 13)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2010, 2, 14)?, "春節"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "春節"), + (NaiveDate::from_ymd_res(2010, 2, 16)?, "春節"), + (NaiveDate::from_ymd_res(2010, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2010, 6, 16)?, "端午節"), + (NaiveDate::from_ymd_res(2010, 9, 22)?, "中秋節"), + (NaiveDate::from_ymd_res(2010, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2010, 2, 17)?, "農曆除夕(慶祝)"), + (NaiveDate::from_ymd_res(2010, 2, 18)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2010, 2, 19)?, + "休息日(2010-02-06日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2011, 2, 2)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2011, 2, 3)?, "春節"), + (NaiveDate::from_ymd_res(2011, 2, 4)?, "春節"), + (NaiveDate::from_ymd_res(2011, 2, 5)?, "春節"), + (NaiveDate::from_ymd_res(2011, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2011, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2011, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2011, 6, 6)?, "端午節"), + (NaiveDate::from_ymd_res(2011, 9, 12)?, "中秋節"), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2011, 2, 7)?, "春節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2012, 1, 22)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2012, 1, 23)?, "春節"), + (NaiveDate::from_ymd_res(2012, 1, 24)?, "春節"), + (NaiveDate::from_ymd_res(2012, 1, 25)?, "春節"), + (NaiveDate::from_ymd_res(2012, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2012, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2012, 6, 23)?, "端午節"), + (NaiveDate::from_ymd_res(2012, 9, 30)?, "中秋節"), + (NaiveDate::from_ymd_res(2012, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2012, 1, 26)?, "農曆除夕(慶祝)"), + ( + NaiveDate::from_ymd_res(2012, 1, 27)?, + "休息日(2012-02-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 27)?, + "休息日(2012-03-03日起取代)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 31)?, + "休息日(2012-12-22日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2013, 2, 9)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2013, 2, 10)?, "春節"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "春節"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "春節"), + (NaiveDate::from_ymd_res(2013, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2013, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2013, 6, 12)?, "端午節"), + (NaiveDate::from_ymd_res(2013, 9, 19)?, "中秋節"), + (NaiveDate::from_ymd_res(2013, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2013, 2, 13)?, "農曆除夕(慶祝)"), + (NaiveDate::from_ymd_res(2013, 2, 14)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2013, 2, 15)?, + "休息日(2013-02-23日起取代)", + ), + ( + NaiveDate::from_ymd_res(2013, 9, 20)?, + "休息日(2013-09-14日起取代)", + ), + (NaiveDate::from_ymd_res(2013, 4, 5)?, "兒童節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2014, 1, 30)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2014, 1, 31)?, "春節"), + (NaiveDate::from_ymd_res(2014, 2, 1)?, "春節"), + (NaiveDate::from_ymd_res(2014, 2, 2)?, "春節"), + (NaiveDate::from_ymd_res(2014, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2014, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2014, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2014, 6, 2)?, "端午節"), + (NaiveDate::from_ymd_res(2014, 9, 8)?, "中秋節"), + (NaiveDate::from_ymd_res(2014, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2014, 2, 3)?, "春節(慶祝)"), + (NaiveDate::from_ymd_res(2014, 2, 4)?, "春節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2015, 2, 18)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2015, 2, 19)?, "春節"), + (NaiveDate::from_ymd_res(2015, 2, 20)?, "春節"), + (NaiveDate::from_ymd_res(2015, 2, 21)?, "春節"), + (NaiveDate::from_ymd_res(2015, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2015, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2015, 6, 20)?, "端午節"), + (NaiveDate::from_ymd_res(2015, 9, 27)?, "中秋節"), + (NaiveDate::from_ymd_res(2015, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2015, 2, 27)?, "和平紀念日(慶祝)"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "兒童節(慶祝)"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "清明節(慶祝)"), + (NaiveDate::from_ymd_res(2015, 6, 19)?, "端午節(慶祝)"), + (NaiveDate::from_ymd_res(2015, 9, 28)?, "中秋節(慶祝)"), + ( + NaiveDate::from_ymd_res(2015, 10, 9)?, + "中華民國國慶日(慶祝)", + ), + (NaiveDate::from_ymd_res(2015, 2, 23)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2015, 1, 2)?, + "休息日(2014-12-27日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2016, 2, 7)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "春節"), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "春節"), + (NaiveDate::from_ymd_res(2016, 2, 10)?, "春節"), + (NaiveDate::from_ymd_res(2016, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2016, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2016, 6, 9)?, "端午節"), + (NaiveDate::from_ymd_res(2016, 9, 15)?, "中秋節"), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2016, 2, 29)?, "和平紀念日(慶祝)"), + (NaiveDate::from_ymd_res(2016, 2, 11)?, "農曆除夕(慶祝)"), + ( + NaiveDate::from_ymd_res(2016, 2, 12)?, + "休息日(2016-01-30日起取代)", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 10)?, + "休息日(2016-06-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 16)?, + "休息日(2016-09-10日起取代)", + ), + (NaiveDate::from_ymd_res(2016, 4, 5)?, "兒童節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2017, 1, 27)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2017, 1, 28)?, "春節"), + (NaiveDate::from_ymd_res(2017, 1, 29)?, "春節"), + (NaiveDate::from_ymd_res(2017, 1, 30)?, "春節"), + (NaiveDate::from_ymd_res(2017, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2017, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2017, 5, 30)?, "端午節"), + (NaiveDate::from_ymd_res(2017, 10, 4)?, "中秋節"), + (NaiveDate::from_ymd_res(2017, 10, 10)?, "中華民國國慶日"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "中華民國開國紀念日(慶祝)", + ), + (NaiveDate::from_ymd_res(2017, 1, 31)?, "春節(慶祝)"), + (NaiveDate::from_ymd_res(2017, 2, 1)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2017, 2, 27)?, + "休息日(2017-02-18日起取代)", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 29)?, + "休息日(2017-06-03日起取代)", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 9)?, + "休息日(2017-09-30日起取代)", + ), + (NaiveDate::from_ymd_res(2017, 4, 3)?, "兒童節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2018, 2, 15)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2018, 2, 16)?, "春節"), + (NaiveDate::from_ymd_res(2018, 2, 17)?, "春節"), + (NaiveDate::from_ymd_res(2018, 2, 18)?, "春節"), + (NaiveDate::from_ymd_res(2018, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2018, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2018, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2018, 6, 18)?, "端午節"), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "中秋節"), + (NaiveDate::from_ymd_res(2018, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2018, 2, 19)?, "春節(慶祝)"), + (NaiveDate::from_ymd_res(2018, 2, 20)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2018, 4, 6)?, + "休息日(2018-03-31日起取代)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "休息日(2018-12-22日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2019, 2, 4)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "春節"), + (NaiveDate::from_ymd_res(2019, 2, 6)?, "春節"), + (NaiveDate::from_ymd_res(2019, 2, 7)?, "春節"), + (NaiveDate::from_ymd_res(2019, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2019, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2019, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2019, 6, 7)?, "端午節"), + (NaiveDate::from_ymd_res(2019, 9, 13)?, "中秋節"), + (NaiveDate::from_ymd_res(2019, 10, 10)?, "中華民國國慶日"), + ( + NaiveDate::from_ymd_res(2019, 2, 8)?, + "休息日(2019-01-19日起取代)", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 1)?, + "休息日(2019-02-23日起取代)", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 11)?, + "休息日(2019-10-05日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2020, 1, 24)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "春節"), + (NaiveDate::from_ymd_res(2020, 1, 26)?, "春節"), + (NaiveDate::from_ymd_res(2020, 1, 27)?, "春節"), + (NaiveDate::from_ymd_res(2020, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2020, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2020, 6, 25)?, "端午節"), + (NaiveDate::from_ymd_res(2020, 10, 1)?, "中秋節"), + (NaiveDate::from_ymd_res(2020, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2020, 4, 3)?, "兒童節(慶祝)"), + (NaiveDate::from_ymd_res(2020, 4, 2)?, "清明節(慶祝)"), + ( + NaiveDate::from_ymd_res(2020, 10, 9)?, + "中華民國國慶日(慶祝)", + ), + (NaiveDate::from_ymd_res(2020, 1, 28)?, "春節(慶祝)"), + (NaiveDate::from_ymd_res(2020, 1, 29)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2020, 1, 23)?, + "休息日(2020-02-15日起取代)", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 26)?, + "休息日(2020-06-20日起取代)", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 2)?, + "休息日(2020-09-26日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "中華民國開國紀念日"), + ( + NaiveDate::from_ymd_res(2021, 12, 31)?, + "中華民國開國紀念日(慶祝)", + ), + (NaiveDate::from_ymd_res(2021, 2, 11)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "春節"), + (NaiveDate::from_ymd_res(2021, 2, 13)?, "春節"), + (NaiveDate::from_ymd_res(2021, 2, 14)?, "春節"), + (NaiveDate::from_ymd_res(2021, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2021, 6, 14)?, "端午節"), + (NaiveDate::from_ymd_res(2021, 9, 21)?, "中秋節"), + (NaiveDate::from_ymd_res(2021, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2021, 3, 1)?, "和平紀念日(慶祝)"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "兒童節(慶祝)"), + (NaiveDate::from_ymd_res(2021, 4, 6)?, "清明節(慶祝)"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "中華民國國慶日(慶祝)", + ), + (NaiveDate::from_ymd_res(2021, 2, 15)?, "春節(慶祝)"), + (NaiveDate::from_ymd_res(2021, 2, 16)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2021, 2, 10)?, + "休息日(2021-02-20日起取代)", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 20)?, + "休息日(2021-09-11日起取代)", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "兒童節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2022, 1, 31)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2022, 2, 1)?, "春節"), + (NaiveDate::from_ymd_res(2022, 2, 2)?, "春節"), + (NaiveDate::from_ymd_res(2022, 2, 3)?, "春節"), + (NaiveDate::from_ymd_res(2022, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2022, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2022, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2022, 6, 3)?, "端午節"), + (NaiveDate::from_ymd_res(2022, 9, 10)?, "中秋節"), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2022, 9, 9)?, "中秋節(慶祝)"), + ( + NaiveDate::from_ymd_res(2022, 2, 4)?, + "休息日(2022-01-22日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2023, 1, 21)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2023, 1, 22)?, "春節"), + (NaiveDate::from_ymd_res(2023, 1, 23)?, "春節"), + (NaiveDate::from_ymd_res(2023, 1, 24)?, "春節"), + (NaiveDate::from_ymd_res(2023, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2023, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2023, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2023, 6, 22)?, "端午節"), + (NaiveDate::from_ymd_res(2023, 9, 29)?, "中秋節"), + (NaiveDate::from_ymd_res(2023, 10, 10)?, "中華民國國慶日"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "中華民國開國紀念日(慶祝)", + ), + (NaiveDate::from_ymd_res(2023, 1, 25)?, "農曆除夕(慶祝)"), + (NaiveDate::from_ymd_res(2023, 1, 26)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2023, 1, 20)?, + "休息日(2023-01-07日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 27)?, + "休息日(2023-02-04日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 27)?, + "休息日(2023-02-18日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 3)?, + "休息日(2023-03-25日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 23)?, + "休息日(2023-06-17日起取代)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "休息日(2023-09-23日起取代)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2024, 2, 9)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2024, 2, 10)?, "春節"), + (NaiveDate::from_ymd_res(2024, 2, 11)?, "春節"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "春節"), + (NaiveDate::from_ymd_res(2024, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2024, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2024, 6, 10)?, "端午節"), + (NaiveDate::from_ymd_res(2024, 9, 17)?, "中秋節"), + (NaiveDate::from_ymd_res(2024, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2024, 2, 13)?, "春節(慶祝)"), + (NaiveDate::from_ymd_res(2024, 2, 14)?, "春節(慶祝)"), + ( + NaiveDate::from_ymd_res(2024, 2, 8)?, + "休息日(2024-02-17日起取代)", + ), + (NaiveDate::from_ymd_res(2024, 4, 5)?, "兒童節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2025, 1, 28)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2025, 1, 29)?, "春節"), + (NaiveDate::from_ymd_res(2025, 1, 30)?, "春節"), + (NaiveDate::from_ymd_res(2025, 1, 31)?, "春節"), + (NaiveDate::from_ymd_res(2025, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2025, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2025, 5, 31)?, "端午節"), + (NaiveDate::from_ymd_res(2025, 10, 6)?, "中秋節"), + (NaiveDate::from_ymd_res(2025, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2025, 5, 30)?, "端午節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2026, 2, 16)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "春節"), + (NaiveDate::from_ymd_res(2026, 2, 18)?, "春節"), + (NaiveDate::from_ymd_res(2026, 2, 19)?, "春節"), + (NaiveDate::from_ymd_res(2026, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2026, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2026, 6, 19)?, "端午節"), + (NaiveDate::from_ymd_res(2026, 9, 25)?, "中秋節"), + (NaiveDate::from_ymd_res(2026, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2026, 2, 27)?, "和平紀念日(慶祝)"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "兒童節(慶祝)"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "清明節(慶祝)"), + ( + NaiveDate::from_ymd_res(2026, 10, 9)?, + "中華民國國慶日(慶祝)", + ), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "中華民國開國紀念日"), + ( + NaiveDate::from_ymd_res(2027, 12, 31)?, + "中華民國開國紀念日(慶祝)", + ), + (NaiveDate::from_ymd_res(2027, 2, 5)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2027, 2, 6)?, "春節"), + (NaiveDate::from_ymd_res(2027, 2, 7)?, "春節"), + (NaiveDate::from_ymd_res(2027, 2, 8)?, "春節"), + (NaiveDate::from_ymd_res(2027, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2027, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2027, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2027, 6, 9)?, "端午節"), + (NaiveDate::from_ymd_res(2027, 9, 15)?, "中秋節"), + (NaiveDate::from_ymd_res(2027, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2027, 3, 1)?, "和平紀念日(慶祝)"), + (NaiveDate::from_ymd_res(2027, 4, 6)?, "兒童節(慶祝)"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "中華民國國慶日(慶祝)", + ), + (NaiveDate::from_ymd_res(2027, 2, 9)?, "春節(慶祝)"), + (NaiveDate::from_ymd_res(2027, 2, 10)?, "春節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2028, 1, 25)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2028, 1, 26)?, "春節"), + (NaiveDate::from_ymd_res(2028, 1, 27)?, "春節"), + (NaiveDate::from_ymd_res(2028, 1, 28)?, "春節"), + (NaiveDate::from_ymd_res(2028, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2028, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2028, 5, 28)?, "端午節"), + (NaiveDate::from_ymd_res(2028, 10, 3)?, "中秋節"), + (NaiveDate::from_ymd_res(2028, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2028, 5, 29)?, "端午節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "春節"), + (NaiveDate::from_ymd_res(2029, 2, 14)?, "春節"), + (NaiveDate::from_ymd_res(2029, 2, 15)?, "春節"), + (NaiveDate::from_ymd_res(2029, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2029, 4, 4)?, "兒童節; 清明節"), + (NaiveDate::from_ymd_res(2029, 6, 16)?, "端午節"), + (NaiveDate::from_ymd_res(2029, 9, 22)?, "中秋節"), + (NaiveDate::from_ymd_res(2029, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2029, 6, 15)?, "端午節(慶祝)"), + (NaiveDate::from_ymd_res(2029, 9, 21)?, "中秋節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "中華民國開國紀念日"), + (NaiveDate::from_ymd_res(2030, 2, 2)?, "農曆除夕"), + (NaiveDate::from_ymd_res(2030, 2, 3)?, "春節"), + (NaiveDate::from_ymd_res(2030, 2, 4)?, "春節"), + (NaiveDate::from_ymd_res(2030, 2, 5)?, "春節"), + (NaiveDate::from_ymd_res(2030, 2, 28)?, "和平紀念日"), + (NaiveDate::from_ymd_res(2030, 4, 4)?, "兒童節"), + (NaiveDate::from_ymd_res(2030, 4, 5)?, "清明節"), + (NaiveDate::from_ymd_res(2030, 6, 5)?, "端午節"), + (NaiveDate::from_ymd_res(2030, 9, 12)?, "中秋節"), + (NaiveDate::from_ymd_res(2030, 10, 10)?, "中華民國國慶日"), + (NaiveDate::from_ymd_res(2030, 2, 6)?, "農曆除夕(慶祝)"), + (NaiveDate::from_ymd_res(2030, 2, 7)?, "春節(慶祝)"), + ], + &mut map, + Country::TW, + "Taiwan", + ); + + Ok(map) +} diff --git a/src/data/ua.rs b/src/data/ua.rs new file mode 100644 index 0000000..d13ebc5 --- /dev/null +++ b/src/data/ua.rs @@ -0,0 +1,1496 @@ +//! Ukraine +use super::*; + +/// Generate holiday map for Ukraine. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2000, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2000, 4, 30)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2000, 6, 18)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2000, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2000, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 24)?, + "День незалежності України", + ), + (NaiveDate::from_ymd_res(2000, 1, 3)?, "Новий рік (вихідний)"), + ( + NaiveDate::from_ymd_res(2000, 5, 3)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2000, 6, 19)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2000, 5, 8)?, + "Вихідний день (перенесено з 06.05.2000)", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 25)?, + "Вихідний день (перенесено з 27.08.2000)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2001, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2001, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2001, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 8)?, + "Різдво Христове (за юліанським календарем) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 16)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2001, 6, 4)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2001, 3, 9)?, + "Вихідний день (перенесено з 11.03.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 30)?, + "Вихідний день (перенесено з 28.04.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 10)?, + "Вихідний день (перенесено з 05.05.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 11)?, + "Вихідний день (перенесено з 06.05.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 29)?, + "Вихідний день (перенесено з 23.06.2001)", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 31)?, + "Вихідний день (перенесено з 29.12.2001)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2002, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2002, 5, 5)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2002, 6, 23)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2002, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2002, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 6)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2002, 6, 24)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2002, 8, 26)?, + "День незалежності України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 3)?, + "Вихідний день (перенесено з 11.05.2002)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 30)?, + "Вихідний день (перенесено з 28.12.2002)", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 31)?, + "Вихідний день (перенесено з 29.12.2002)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2003, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2003, 6, 15)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2003, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2003, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 10)?, + "Міжнародний жіночий день (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2003, 6, 16)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2003, 6, 30)?, + "День Конституції України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 25)?, + "День незалежності України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 6)?, + "Вихідний день (перенесено з 04.01.2003)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2004, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2004, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2004, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 12)?, + "Великдень (Пасха) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 3)?, + "День міжнародної солідарності трудящих (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 4)?, + "День міжнародної солідарності трудящих (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 10)?, + "День перемоги (вихідний)", + ), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2004, 1, 2)?, + "Вихідний день (перенесено з 10.01.2004)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 5)?, + "Вихідний день (перенесено з 17.01.2004)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 6)?, + "Вихідний день (перенесено з 31.01.2004)", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 23)?, + "Вихідний день (перенесено з 21.08.2004)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2005, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 8)?, + "Міжнародний жіночий день", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Великдень (Пасха); День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2005, 6, 19)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2005, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2005, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 24)?, + "День незалежності України", + ), + (NaiveDate::from_ymd_res(2005, 1, 3)?, "Новий рік (вихідний)"), + ( + NaiveDate::from_ymd_res(2005, 5, 3)?, + "Великдень (Пасха) (вихідний); День міжнародної солідарності трудящих (вихідний)", + ), + (NaiveDate::from_ymd_res(2005, 6, 20)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2005, 3, 7)?, + "Вихідний день (перенесено з 05.03.2005)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 10)?, + "Вихідний день (перенесено з 14.05.2005)", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 27)?, + "Вихідний день (перенесено з 25.06.2005)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2006, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2006, 4, 23)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2006, 6, 11)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2006, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2006, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 24)?, + "День незалежності України", + ), + (NaiveDate::from_ymd_res(2006, 1, 2)?, "Новий рік (вихідний)"), + ( + NaiveDate::from_ymd_res(2006, 1, 9)?, + "Різдво Христове (за юліанським календарем) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2006, 6, 12)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2006, 1, 3)?, + "Вихідний день (перенесено з 21.01.2006)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 4)?, + "Вихідний день (перенесено з 04.02.2006)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 5)?, + "Вихідний день (перенесено з 18.02.2006)", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 6)?, + "Вихідний день (перенесено з 11.03.2006)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 8)?, + "Вихідний день (перенесено з 06.05.2006)", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 25)?, + "Вихідний день (перенесено з 09.09.2006)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2007, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2007, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2007, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 8)?, + "Різдво Христове (за юліанським календарем) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 9)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2007, 1, 2)?, + "Вихідний день (перенесено з 20.01.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 3)?, + "Вихідний день (перенесено з 27.01.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 4)?, + "Вихідний день (перенесено з 10.02.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 5)?, + "Вихідний день (перенесено з 24.02.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 9)?, + "Вихідний день (перенесено з 03.03.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 30)?, + "Вихідний день (перенесено з 28.04.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 29)?, + "Вихідний день (перенесено з 16.06.2007)", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 31)?, + "Вихідний день (перенесено з 29.12.2007)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2008, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2008, 6, 15)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2008, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2008, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 10)?, + "Міжнародний жіночий день (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2008, 6, 16)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2008, 6, 30)?, + "День Конституції України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 25)?, + "День незалежності України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 2)?, + "Вихідний день (перенесено з 12.01.2008)", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 3)?, + "Вихідний день (перенесено з 26.01.2008)", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 4)?, + "Вихідний день (перенесено з 09.02.2008)", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 29)?, + "Вихідний день (перенесено з 17.05.2008)", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 30)?, + "Вихідний день (перенесено з 31.05.2008)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2009, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2009, 4, 19)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2009, 6, 7)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2009, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2009, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "Міжнародний жіночий день (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 20)?, + "Великдень (Пасха) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 4)?, + "День міжнародної солідарності трудящих (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 11)?, + "День перемоги (вихідний)", + ), + (NaiveDate::from_ymd_res(2009, 6, 8)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2009, 6, 29)?, + "День Конституції України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 2)?, + "Вихідний день (перенесено з 10.01.2009)", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 5)?, + "Вихідний день (перенесено з 24.01.2009)", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 6)?, + "Вихідний день (перенесено з 07.02.2009)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2010, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2010, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2010, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 5)?, + "Великдень (Пасха) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 3)?, + "День міжнародної солідарності трудящих (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 4)?, + "День міжнародної солідарності трудящих (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 10)?, + "День перемоги (вихідний)", + ), + (NaiveDate::from_ymd_res(2010, 5, 24)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2010, 1, 4)?, + "Вихідний день (перенесено з 30.01.2010)", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 5)?, + "Вихідний день (перенесено з 13.02.2010)", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 6)?, + "Вихідний день (перенесено з 27.02.2010)", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 8)?, + "Вихідний день (перенесено з 13.03.2010)", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 23)?, + "Вихідний день (перенесено з 21.08.2010)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2011, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2011, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2011, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 24)?, + "День незалежності України", + ), + (NaiveDate::from_ymd_res(2011, 1, 3)?, "Новий рік (вихідний)"), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Великдень (Пасха) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 3)?, + "День міжнародної солідарності трудящих (вихідний)", + ), + (NaiveDate::from_ymd_res(2011, 6, 13)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2011, 3, 7)?, + "Вихідний день (перенесено з 12.03.2011)", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 27)?, + "Вихідний день (перенесено з 25.06.2011)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2012, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2012, 4, 15)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2012, 6, 3)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2012, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2012, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 24)?, + "День незалежності України", + ), + (NaiveDate::from_ymd_res(2012, 1, 2)?, "Новий рік (вихідний)"), + ( + NaiveDate::from_ymd_res(2012, 1, 9)?, + "Різдво Христове (за юліанським календарем) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 16)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2012, 6, 4)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2012, 3, 9)?, + "Вихідний день (перенесено з 03.03.2012)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 20)?, + "Вихідний день (перенесено з 28.04.2012)", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 29)?, + "Вихідний день (перенесено з 07.07.2012)", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 31)?, + "Вихідний день (перенесено з 29.12.2012)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2013, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2013, 5, 5)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2013, 6, 23)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2013, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2013, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 6)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2013, 6, 24)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2013, 8, 26)?, + "День незалежності України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 3)?, + "Вихідний день (перенесено з 18.05.2013)", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 10)?, + "Вихідний день (перенесено з 01.06.2013)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2014, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2014, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2014, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 10)?, + "Міжнародний жіночий день (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 21)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2014, 6, 9)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2014, 6, 30)?, + "День Конституції України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 25)?, + "День незалежності України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 2)?, + "Вихідний день (перенесено з 11.01.2014)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 3)?, + "Вихідний день (перенесено з 25.01.2014)", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 6)?, + "Вихідний день (перенесено з 08.02.2014)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2015, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2015, 4, 12)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2015, 5, 31)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2015, 5, 9)?, "День перемоги"), + ( + NaiveDate::from_ymd_res(2015, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 14)?, + "День захисника України", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 9)?, + "Міжнародний жіночий день (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 13)?, + "Великдень (Пасха) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 4)?, + "День міжнародної солідарності трудящих (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 11)?, + "День перемоги (вихідний)", + ), + (NaiveDate::from_ymd_res(2015, 6, 1)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2015, 6, 29)?, + "День Конституції України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 2)?, + "Вихідний день (перенесено з 17.01.2015)", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 8)?, + "Вихідний день (перенесено з 31.01.2015)", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 9)?, + "Вихідний день (перенесено з 14.02.2015)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2016, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 8)?, + "Міжнародний жіночий день", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Великдень (Пасха); День міжнародної солідарності трудящих", + ), + (NaiveDate::from_ymd_res(2016, 6, 19)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 9)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги)", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 14)?, + "День захисника України", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 3)?, + "Великдень (Пасха) (вихідний); День міжнародної солідарності трудящих (вихідний)", + ), + (NaiveDate::from_ymd_res(2016, 6, 20)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2016, 1, 8)?, + "Вихідний день (перенесено з 16.01.2016)", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 7)?, + "Вихідний день (перенесено з 12.03.2016)", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 27)?, + "Вихідний день (перенесено з 02.07.2016)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2017, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Трійця"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 2)?, + "День міжнародної солідарності трудящих", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 9)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги)", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 14)?, + "День захисника України", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 25)?, + "Різдво Христове (за григоріанським календарем)", + ), + (NaiveDate::from_ymd_res(2017, 1, 2)?, "Новий рік (вихідний)"), + ( + NaiveDate::from_ymd_res(2017, 1, 9)?, + "Різдво Христове (за юліанським календарем) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2017, 6, 5)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2017, 10, 16)?, + "День захисника України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 8)?, + "Вихідний день (перенесено з 13.05.2017)", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 25)?, + "Вихідний день (перенесено з 19.08.2017)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2018, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2018, 4, 8)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2018, 5, 27)?, "Трійця"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "День праці"), + ( + NaiveDate::from_ymd_res(2018, 5, 9)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 14)?, + "День захисника України", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 25)?, + "Різдво Христове (за григоріанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 8)?, + "Різдво Христове (за юліанським календарем) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 9)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2018, 10, 15)?, + "День захисника України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 9)?, + "Вихідний день (перенесено з 03.03.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "Вихідний день (перенесено з 05.05.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 29)?, + "Вихідний день (перенесено з 23.06.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 24)?, + "Вихідний день (перенесено з 22.12.2018)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Вихідний день (перенесено з 29.12.2018)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2019, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2019, 4, 28)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2019, 6, 16)?, "Трійця"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "День праці"), + ( + NaiveDate::from_ymd_res(2019, 5, 9)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги)", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "День захисника України", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 25)?, + "Різдво Христове (за григоріанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 29)?, + "Великдень (Пасха) (вихідний)", + ), + (NaiveDate::from_ymd_res(2019, 6, 17)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2019, 8, 26)?, + "День незалежності України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 30)?, + "Вихідний день (перенесено з 11.05.2019)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 30)?, + "Вихідний день (перенесено з 21.12.2019)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 31)?, + "Вихідний день (перенесено з 28.12.2019)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2020, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2020, 4, 19)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2020, 6, 7)?, "Трійця"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "День праці"), + ( + NaiveDate::from_ymd_res(2020, 5, 9)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги)", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 14)?, + "День захисника України", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 25)?, + "Різдво Христове (за григоріанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 9)?, + "Міжнародний жіночий день (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 20)?, + "Великдень (Пасха) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 11)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги) (вихідний)", + ), + (NaiveDate::from_ymd_res(2020, 6, 8)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2020, 6, 29)?, + "День Конституції України (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 6)?, + "Вихідний день (перенесено з 11.01.2020)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2021, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2021, 5, 2)?, "Великдень (Пасха)"), + (NaiveDate::from_ymd_res(2021, 6, 20)?, "Трійця"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "День праці"), + ( + NaiveDate::from_ymd_res(2021, 5, 9)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги)", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 28)?, + "День Конституції України", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 24)?, + "День незалежності України", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 14)?, + "День захисників і захисниць України", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 25)?, + "Різдво Христове (за григоріанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "День праці (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 4)?, + "Великдень (Пасха) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 10)?, + "День перемоги над нацизмом у Другій світовій війні (День перемоги) (вихідний)", + ), + (NaiveDate::from_ymd_res(2021, 6, 21)?, "Трійця (вихідний)"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Різдво Христове (за григоріанським календарем) (вихідний)", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 8)?, + "Вихідний день (перенесено з 16.01.2021)", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 23)?, + "Вихідний день (перенесено з 28.08.2021)", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 15)?, + "Вихідний день (перенесено з 23.10.2021)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Новий рік"), + ( + NaiveDate::from_ymd_res(2022, 1, 7)?, + "Різдво Христове (за юліанським календарем)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "Міжнародний жіночий день", + ), + (NaiveDate::from_ymd_res(2022, 1, 3)?, "Новий рік (вихідний)"), + ( + NaiveDate::from_ymd_res(2022, 3, 7)?, + "Вихідний день (перенесено з 12.03.2022)", + ), + ], + &mut map, + Country::UA, + "Ukraine", + ); + + Ok(map) +} diff --git a/src/data/us.rs b/src/data/us.rs new file mode 100644 index 0000000..69be77f --- /dev/null +++ b/src/data/us.rs @@ -0,0 +1,1006 @@ +//! United States +use super::*; + +/// Generate holiday map for United States. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 5, 29)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2000, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 9, 4)?, "Labor Day"), + (NaiveDate::from_ymd_res(2000, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2000, 11, 10)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 11, 23)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 17)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 5, 28)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2001, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 9, 3)?, "Labor Day"), + (NaiveDate::from_ymd_res(2001, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2001, 11, 12)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 11, 22)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2001, 1, 15)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2001, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 5, 27)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2002, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 9, 2)?, "Labor Day"), + (NaiveDate::from_ymd_res(2002, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2002, 11, 28)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2002, 1, 21)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 5, 26)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2003, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 9, 1)?, "Labor Day"), + (NaiveDate::from_ymd_res(2003, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2003, 11, 27)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2003, 1, 20)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 31)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 5, 31)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2004, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 7, 5)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 9, 6)?, "Labor Day"), + (NaiveDate::from_ymd_res(2004, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2004, 11, 25)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 24)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 19)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 5, 30)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2005, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 9, 5)?, "Labor Day"), + (NaiveDate::from_ymd_res(2005, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2005, 11, 24)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 5, 29)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2006, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 9, 4)?, "Labor Day"), + (NaiveDate::from_ymd_res(2006, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2006, 11, 10)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 11, 23)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 16)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 5, 28)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2007, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 9, 3)?, "Labor Day"), + (NaiveDate::from_ymd_res(2007, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2007, 11, 12)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 11, 22)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 15)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 5, 26)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2008, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2008, 9, 1)?, "Labor Day"), + (NaiveDate::from_ymd_res(2008, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2008, 11, 27)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2008, 1, 21)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2009, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2009, 7, 3)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2009, 9, 7)?, "Labor Day"), + (NaiveDate::from_ymd_res(2009, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2009, 11, 26)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2009, 1, 19)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 31)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 5, 31)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2010, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 7, 5)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 9, 6)?, "Labor Day"), + (NaiveDate::from_ymd_res(2010, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2010, 11, 25)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 24)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 18)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 5, 30)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2011, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 9, 5)?, "Labor Day"), + (NaiveDate::from_ymd_res(2011, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2011, 11, 24)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 5, 28)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2012, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 9, 3)?, "Labor Day"), + (NaiveDate::from_ymd_res(2012, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2012, 11, 12)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 11, 22)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 16)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 5, 27)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2013, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 9, 2)?, "Labor Day"), + (NaiveDate::from_ymd_res(2013, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2013, 11, 28)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2013, 1, 21)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 5, 26)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2014, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 9, 1)?, "Labor Day"), + (NaiveDate::from_ymd_res(2014, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2014, 11, 27)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2014, 1, 20)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2015, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2015, 7, 3)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 9, 7)?, "Labor Day"), + (NaiveDate::from_ymd_res(2015, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2015, 11, 26)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2015, 1, 19)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 5, 30)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2016, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 9, 5)?, "Labor Day"), + (NaiveDate::from_ymd_res(2016, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2016, 11, 24)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 18)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 5, 29)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2017, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 9, 4)?, "Labor Day"), + (NaiveDate::from_ymd_res(2017, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2017, 11, 10)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 11, 23)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 16)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 5, 28)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2018, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 9, 3)?, "Labor Day"), + (NaiveDate::from_ymd_res(2018, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2018, 11, 12)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 11, 22)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2018, 1, 15)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 5, 27)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2019, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 9, 2)?, "Labor Day"), + (NaiveDate::from_ymd_res(2019, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2019, 11, 28)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2019, 1, 21)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Memorial Day"), + (NaiveDate::from_ymd_res(2020, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2020, 7, 3)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 9, 7)?, "Labor Day"), + (NaiveDate::from_ymd_res(2020, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2020, 11, 26)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 20)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2020, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 31)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 5, 31)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2021, 6, 19)?, + "Juneteenth National Independence Day", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 18)?, + "Juneteenth National Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 5)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 9, 6)?, "Labor Day"), + (NaiveDate::from_ymd_res(2021, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2021, 11, 25)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 24)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 18)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 5, 30)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2022, 6, 19)?, + "Juneteenth National Independence Day", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 20)?, + "Juneteenth National Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 9, 5)?, "Labor Day"), + (NaiveDate::from_ymd_res(2022, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2022, 11, 24)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 5, 29)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2023, 6, 19)?, + "Juneteenth National Independence Day", + ), + (NaiveDate::from_ymd_res(2023, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 9, 4)?, "Labor Day"), + (NaiveDate::from_ymd_res(2023, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2023, 11, 10)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 11, 23)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 16)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2023, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 5, 27)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2024, 6, 19)?, + "Juneteenth National Independence Day", + ), + (NaiveDate::from_ymd_res(2024, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 9, 2)?, "Labor Day"), + (NaiveDate::from_ymd_res(2024, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2024, 11, 28)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2024, 1, 15)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2024, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 5, 26)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2025, 6, 19)?, + "Juneteenth National Independence Day", + ), + (NaiveDate::from_ymd_res(2025, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 9, 1)?, "Labor Day"), + (NaiveDate::from_ymd_res(2025, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2025, 11, 27)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 20)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2026, 6, 19)?, + "Juneteenth National Independence Day", + ), + (NaiveDate::from_ymd_res(2026, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2026, 7, 3)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 9, 7)?, "Labor Day"), + (NaiveDate::from_ymd_res(2026, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2026, 11, 26)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2026, 1, 19)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2026, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 31)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 5, 31)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2027, 6, 19)?, + "Juneteenth National Independence Day", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 18)?, + "Juneteenth National Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 7, 4)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 7, 5)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 9, 6)?, "Labor Day"), + (NaiveDate::from_ymd_res(2027, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2027, 11, 25)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 24)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 18)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 5, 29)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2028, 6, 19)?, + "Juneteenth National Independence Day", + ), + (NaiveDate::from_ymd_res(2028, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 9, 4)?, "Labor Day"), + (NaiveDate::from_ymd_res(2028, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2028, 11, 10)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 11, 23)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 17)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2028, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 5, 28)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2029, 6, 19)?, + "Juneteenth National Independence Day", + ), + (NaiveDate::from_ymd_res(2029, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 9, 3)?, "Labor Day"), + (NaiveDate::from_ymd_res(2029, 11, 11)?, "Veterans Day"), + ( + NaiveDate::from_ymd_res(2029, 11, 12)?, + "Veterans Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 11, 22)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2029, 1, 15)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2029, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 5, 27)?, "Memorial Day"), + ( + NaiveDate::from_ymd_res(2030, 6, 19)?, + "Juneteenth National Independence Day", + ), + (NaiveDate::from_ymd_res(2030, 7, 4)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 9, 2)?, "Labor Day"), + (NaiveDate::from_ymd_res(2030, 11, 11)?, "Veterans Day"), + (NaiveDate::from_ymd_res(2030, 11, 28)?, "Thanksgiving"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2030, 1, 21)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2030, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US, + "United States", + ); + + Ok(map) +} diff --git a/src/data/uy.rs b/src/data/uy.rs new file mode 100644 index 0000000..e0d1060 --- /dev/null +++ b/src/data/uy.rs @@ -0,0 +1,776 @@ +//! Uruguay +use super::*; + +/// Generate holiday map for Uruguay. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Día de la Familia"), + ( + NaiveDate::from_ymd_res(2000, 3, 1)?, + "Inauguración del Presidente de la República", + ), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Día de la Familia"), + ( + NaiveDate::from_ymd_res(2005, 3, 1)?, + "Inauguración del Presidente de la República", + ), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Día de la Familia"), + ( + NaiveDate::from_ymd_res(2010, 3, 1)?, + "Inauguración del Presidente de la República", + ), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Día de la Familia"), + ( + NaiveDate::from_ymd_res(2015, 3, 1)?, + "Inauguración del Presidente de la República", + ), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Día de la Familia"), + ( + NaiveDate::from_ymd_res(2020, 3, 1)?, + "Inauguración del Presidente de la República", + ), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2022, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2023, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2024, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2027, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2028, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2029, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Día de los Trabajadores", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 18)?, + "Jura de la Constitución", + ), + ( + NaiveDate::from_ymd_res(2030, 8, 25)?, + "Declaratoria de la Independencia", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Día de la Familia"), + ], + &mut map, + Country::UY, + "Uruguay", + ); + + Ok(map) +} diff --git a/src/data/uz.rs b/src/data/uz.rs new file mode 100644 index 0000000..05f707f --- /dev/null +++ b/src/data/uz.rs @@ -0,0 +1,1248 @@ +//! Uzbekistan +use super::*; + +/// Generate holiday map for Uzbekistan. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2000, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2000, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2000, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2000, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2000, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 8)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 27)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 16)?, + "Qurbon hayit (taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2001, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2001, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2001, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2001, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2001, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 5)?, + "Qurbon hayit (taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2002, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2002, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2002, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2002, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2002, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 5)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 22)?, + "Qurbon hayit (taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2003, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2003, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2003, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2003, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2003, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 25)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 11)?, + "Qurbon hayit (taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2004, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2004, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2004, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2004, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2004, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 14)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 1)?, + "Qurbon hayit (taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2005, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2005, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2005, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2005, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2005, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 3)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 21)?, + "Qurbon hayit (taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2006, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2006, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2006, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2006, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2006, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2006, 10, 23)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2006, 1, 10)?, "Qurbon hayit"), + (NaiveDate::from_ymd_res(2006, 12, 30)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2007, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2007, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2007, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2007, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2007, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2007, 10, 13)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2007, 12, 19)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2008, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2008, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2008, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2008, 10, 1)?, + "O‘qituvchi va murabbiylar kuni; Ro‘za hayit", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni; Qurbon hayit", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2009, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2009, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2009, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2009, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2009, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2009, 9, 21)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2010, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2010, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2010, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2010, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2010, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2010, 9, 10)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2010, 11, 16)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2011, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2011, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2011, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2011, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2011, 8, 31)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2011, 11, 6)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2012, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2012, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2012, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2012, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2012, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2012, 8, 19)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2012, 10, 26)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2013, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2013, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2013, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2013, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2013, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2013, 8, 9)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2013, 10, 15)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2014, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2014, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2014, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2014, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2014, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2014, 7, 28)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2014, 10, 4)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2015, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2015, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2015, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2015, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2015, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2015, 7, 18)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2016, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2016, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2016, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2016, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2016, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2016, 7, 6)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2016, 9, 12)?, "Qurbon hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2017, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2017, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2017, 5, 9)?, + "Xotira va qadrlash kuni", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 1)?, + "Mustaqillik kuni; Qurbon hayit", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2017, 6, 26)?, "Ro‘za hayit"), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2018, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2018, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2018, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2018, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2018, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2018, 6, 15)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2018, 8, 21)?, "Qurbon hayit"), + ( + NaiveDate::from_ymd_res(2018, 1, 2)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 3)?, + "Dam olish kuni (06/01 2018 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 19)?, + "Dam olish kuni (17/03 2018 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 22)?, + "Dam olish kuni (24/03 2018 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 30)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 23)?, + "Dam olish kuni (25/08 2018 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 24)?, + "Dam olish kuni (26/08 2018 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 31)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 3)?, + "Dam olish kuni (08/09 2018 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2018, 9, 4)?, + "Dam olish kuni (15/09 2018 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Dam olish kuni (29/12 2018 dan ko‘chirilgan)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2019, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2019, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2019, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2019, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2019, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2019, 6, 5)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2019, 8, 11)?, "Qurbon hayit"), + ( + NaiveDate::from_ymd_res(2019, 1, 2)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2019, 1, 3)?, + "Dam olish kuni (05/01 2019 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 22)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 6)?, + "Dam olish kuni (01/06 2019 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 2)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2019, 9, 3)?, + "Dam olish kuni (07/09 2019 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2019, 12, 31)?, + "Dam olish kuni (28/12 2019 dan ko‘chirilgan)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2020, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2020, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2020, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2020, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2020, 5, 24)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2020, 7, 31)?, "Qurbon hayit"), + ( + NaiveDate::from_ymd_res(2020, 1, 2)?, + "Dam olish kuni (04/01 2020 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 23)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 31)?, + "Dam olish kuni (29/08 2020 dan ko‘chirilgan)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2021, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2021, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2021, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2021, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2021, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2021, 5, 13)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2021, 7, 20)?, "Qurbon hayit"), + ( + NaiveDate::from_ymd_res(2021, 3, 22)?, + "Dam olish kuni (27/03 2021 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 14)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "Dam olish kuni (17/07 2021 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 22)?, + "Dam olish kuni (24/07 2021 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 2)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2021, 9, 3)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 31)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2022, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2022, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2022, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2022, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2022, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2022, 5, 2)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2022, 7, 9)?, "Qurbon hayit"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 4)?, + "Dam olish kuni (08/01 2022 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 22)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 23)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 4)?, + "Dam olish kuni (07/05 2022 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 11)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 12)?, + "Dam olish kuni (16/07 2022 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2022, 9, 2)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2023, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2023, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2023, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2023, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2023, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "Ro‘za hayit"), + (NaiveDate::from_ymd_res(2023, 6, 28)?, "Qurbon hayit"), + ( + NaiveDate::from_ymd_res(2023, 10, 2)?, + "O‘qituvchi va murabbiylar kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 3)?, + "Dam olish kuni (07/01 2023 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 20)?, + "Dam olish kuni (11/03 2023 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 22)?, + "Dam olish kuni (25/03 2023 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 29)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 30)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2024, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2024, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2024, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2024, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2024, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + (NaiveDate::from_ymd_res(2024, 4, 10)?, "Ro‘za hayit"), + ( + NaiveDate::from_ymd_res(2024, 6, 16)?, + "Qurbon hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Qurbon hayit (ko‘chirilgan, taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 2)?, + "Mustaqillik kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 9)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2024, 1, 2)?, + "Dam olish kuni (06/01 2024 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 22)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 11)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 12)?, + "Dam olish kuni (13/04 2024 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 18)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2024, 9, 3)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 30)?, + "Dam olish kuni (14/12 2024 dan ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2024, 12, 31)?, + "Prezidentining farmoni bilan qo‘shimcha dam olish kuni", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2025, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2025, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2025, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2025, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2025, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2025, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 30)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 6)?, + "Qurbon hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 10)?, + "Xotin-qizlar kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 31)?, + "Ro‘za hayit (ko‘chirilgan, taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2026, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2026, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2026, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2026, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2026, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 20)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 27)?, + "Qurbon hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 9)?, + "Xotin-qizlar kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 23)?, + "Navro‘z bayrami (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 11)?, + "Xotira va qadrlash kuni (ko‘chirilgan)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2027, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2027, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2027, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2027, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 9)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 16)?, + "Qurbon hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 22)?, + "Navro‘z bayrami (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 10)?, + "Xotira va qadrlash kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 17)?, + "Qurbon hayit (ko‘chirilgan, taxminiy)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2028, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2028, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2028, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2028, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2028, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 26)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 5)?, + "Qurbon hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "Yangi yil (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 28)?, + "Ro‘za hayit (ko‘chirilgan, taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 2)?, + "O‘qituvchi va murabbiylar kuni (ko‘chirilgan)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2029, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2029, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2029, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2029, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2029, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 24)?, + "Qurbon hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2029, 9, 3)?, + "Mustaqillik kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 10)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni (ko‘chirilgan)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Yangi yil"), + (NaiveDate::from_ymd_res(2030, 3, 8)?, "Xotin-qizlar kuni"), + (NaiveDate::from_ymd_res(2030, 3, 21)?, "Navro‘z bayrami"), + ( + NaiveDate::from_ymd_res(2030, 5, 9)?, + "Xotira va qadrlash kuni", + ), + (NaiveDate::from_ymd_res(2030, 9, 1)?, "Mustaqillik kuni"), + ( + NaiveDate::from_ymd_res(2030, 10, 1)?, + "O‘qituvchi va murabbiylar kuni", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 8)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "Ro‘za hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 13)?, + "Qurbon hayit (taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 15)?, + "Qurbon hayit (ko‘chirilgan, taxminiy)", + ), + ( + NaiveDate::from_ymd_res(2030, 9, 2)?, + "Mustaqillik kuni (ko‘chirilgan)", + ), + ( + NaiveDate::from_ymd_res(2030, 12, 9)?, + "O‘zbekiston Respublikasi Konstitutsiyasi kuni (ko‘chirilgan)", + ), + ], + &mut map, + Country::UZ, + "Uzbekistan", + ); + + Ok(map) +} diff --git a/src/data/ve.rs b/src/data/ve.rs new file mode 100644 index 0000000..56e1347 --- /dev/null +++ b/src/data/ve.rs @@ -0,0 +1,1306 @@ +//! Venezuela +use super::*; + +/// Generate holiday map for Venezuela. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2000, 3, 6)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2000, 3, 7)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2000, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2000, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2000, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2000, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + (NaiveDate::from_ymd_res(2000, 10, 12)?, "Día de la Raza"), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2000, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2001, 2, 26)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2001, 2, 27)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2001, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2001, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2001, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2001, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + (NaiveDate::from_ymd_res(2001, 10, 12)?, "Día de la Raza"), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2001, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2002, 2, 11)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2002, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2002, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2002, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2002, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2002, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2003, 3, 3)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2003, 3, 4)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2003, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2003, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2003, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2003, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2003, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2004, 2, 23)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2004, 2, 24)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2004, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2004, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2004, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2004, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2004, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2004, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2005, 2, 7)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2005, 2, 8)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2005, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2005, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2005, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2005, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2005, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2006, 2, 27)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2006, 2, 28)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2006, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2006, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2006, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2006, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2006, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2007, 2, 20)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2007, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2007, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2007, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2007, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2007, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2008, 2, 4)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2008, 2, 5)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2008, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2008, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2008, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2008, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2008, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2009, 2, 23)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2009, 2, 24)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2009, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2009, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2009, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2009, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2009, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2010, 2, 16)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2010, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2010, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2010, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2010, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2010, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2010, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2011, 3, 7)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2011, 3, 8)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2011, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2011, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2011, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2011, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2011, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2012, 2, 20)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2012, 2, 21)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2012, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2012, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2012, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2012, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2012, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2013, 2, 11)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2013, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2013, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2013, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2013, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2013, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2014, 3, 4)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2014, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2014, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2014, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2014, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2014, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2015, 2, 16)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2015, 2, 17)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2015, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2015, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2015, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2015, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2015, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2016, 2, 9)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2016, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2016, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2016, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2016, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2016, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2017, 2, 27)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2017, 2, 28)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2017, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2017, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2017, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2017, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2017, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2018, 2, 13)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2018, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2018, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2018, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2018, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2018, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2019, 3, 4)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2019, 3, 5)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Jueves Santo"), + ( + NaiveDate::from_ymd_res(2019, 4, 19)?, + "Declaración de la Independencia; Viernes Santo", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2019, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2019, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2019, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2019, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2020, 2, 24)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2020, 2, 25)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2020, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2020, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2020, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2020, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2020, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2021, 2, 15)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2021, 2, 16)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2021, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2021, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2021, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2021, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2021, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2022, 2, 28)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2022, 3, 1)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2022, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2022, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2022, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2022, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2022, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2023, 2, 20)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2023, 2, 21)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2023, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2023, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2023, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2023, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2023, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2024, 2, 13)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2024, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2024, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2024, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2024, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2024, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2025, 3, 4)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2025, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2025, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2025, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2025, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2025, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2026, 2, 16)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2026, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2026, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2026, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2026, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2026, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2027, 2, 8)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2027, 2, 9)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2027, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2027, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2027, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2027, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2027, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2027, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2028, 2, 28)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2028, 2, 29)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2028, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2028, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2028, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2028, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2028, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Jueves Santo"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Viernes Santo"), + ( + NaiveDate::from_ymd_res(2029, 4, 19)?, + "Declaración de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2029, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2029, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2029, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2029, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), + (NaiveDate::from_ymd_res(2030, 3, 4)?, "Lunes de Carnaval"), + (NaiveDate::from_ymd_res(2030, 3, 5)?, "Martes de Carnaval"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Jueves Santo"), + ( + NaiveDate::from_ymd_res(2030, 4, 19)?, + "Declaración de la Independencia; Viernes Santo", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "Dia Mundial del Trabajador", + ), + (NaiveDate::from_ymd_res(2030, 6, 24)?, "Batalla de Carabobo"), + ( + NaiveDate::from_ymd_res(2030, 7, 5)?, + "Día de la Independencia", + ), + ( + NaiveDate::from_ymd_res(2030, 7, 24)?, + "Natalicio de Simón Bolívar", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 12)?, + "Día de la Resistencia Indígena", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Nochebuena"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Día de Navidad"), + ( + NaiveDate::from_ymd_res(2030, 12, 31)?, + "Fiesta de Fin de Año", + ), + ], + &mut map, + Country::VE, + "Venezuela", + ); + + Ok(map) +} diff --git a/src/data/vn.rs b/src/data/vn.rs new file mode 100644 index 0000000..6632bfc --- /dev/null +++ b/src/data/vn.rs @@ -0,0 +1,1644 @@ +//! Vietnam +use super::*; + +/// Generate holiday map for Vietnam. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + ( + NaiveDate::from_ymd_res(2000, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 4)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2000, 2, 5)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2000, 2, 6)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 7)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 8)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 9)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2000, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2000, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2000, 9, 4)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2001, + vec![ + ( + NaiveDate::from_ymd_res(2001, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 23)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2001, 1, 24)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2001, 1, 25)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 26)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 27)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 28)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2001, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2001, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2001, 9, 3)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2002, + vec![ + ( + NaiveDate::from_ymd_res(2002, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 11)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2002, 2, 13)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 14)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 15)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 16)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2002, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2002, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2003, + vec![ + ( + NaiveDate::from_ymd_res(2003, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 31)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2003, 2, 1)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2003, 2, 2)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 3)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 4)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 5)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2003, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2003, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2004, + vec![ + ( + NaiveDate::from_ymd_res(2004, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 21)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2004, 1, 22)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2004, 1, 23)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 24)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 25)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 26)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2004, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2004, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2005, + vec![ + ( + NaiveDate::from_ymd_res(2005, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 8)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2005, 2, 9)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2005, 2, 10)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 12)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 13)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2005, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 3)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2006, + vec![ + ( + NaiveDate::from_ymd_res(2006, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 28)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2006, 1, 29)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2006, 1, 30)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 31)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 1)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 2)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2006, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 9, 4)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2007, + vec![ + ( + NaiveDate::from_ymd_res(2007, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 17)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2007, 2, 18)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 20)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 21)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 22)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 26)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2007, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2007, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2007, 9, 3)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2008, + vec![ + ( + NaiveDate::from_ymd_res(2008, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 6)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2008, 2, 7)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2008, 2, 8)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 9)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 10)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 11)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 15)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2008, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2008, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2009, + vec![ + ( + NaiveDate::from_ymd_res(2009, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 25)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2009, 1, 26)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2009, 1, 27)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 28)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 29)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 30)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 5)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2009, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2009, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2009, 4, 6)?, + "Hung Kings Commemoration Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2010, + vec![ + ( + NaiveDate::from_ymd_res(2010, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 13)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2010, 2, 14)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 16)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 17)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 18)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 23)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2010, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2010, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2011, + vec![ + ( + NaiveDate::from_ymd_res(2011, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 2)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2011, 2, 3)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2011, 2, 4)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 5)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 6)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 7)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 12)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2011, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 3)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2012, + vec![ + ( + NaiveDate::from_ymd_res(2012, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 22)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2012, 1, 23)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2012, 1, 24)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 25)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 26)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 27)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 31)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2012, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2012, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 2)?, + "Hung Kings Commemoration Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 9, 3)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2013, + vec![ + ( + NaiveDate::from_ymd_res(2013, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 9)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2013, 2, 10)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2013, 2, 11)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 12)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 13)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 14)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 19)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2013, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2013, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2014, + vec![ + ( + NaiveDate::from_ymd_res(2014, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 30)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2014, 1, 31)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2014, 2, 1)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 2)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 3)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 4)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 9)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2014, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2014, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2015, + vec![ + ( + NaiveDate::from_ymd_res(2015, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 18)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2015, 2, 19)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2015, 2, 20)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 21)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 22)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 23)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 28)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2015, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2015, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2016, + vec![ + ( + NaiveDate::from_ymd_res(2016, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 7)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2016, 2, 8)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2016, 2, 9)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 10)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 11)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 12)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 16)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2016, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2016, 4, 18)?, + "Hung Kings Commemoration Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2017, + vec![ + ( + NaiveDate::from_ymd_res(2017, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 27)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2017, 1, 28)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2017, 1, 29)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 30)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 31)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 1)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 6)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2017, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 9, 4)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2018, + vec![ + ( + NaiveDate::from_ymd_res(2018, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 15)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2018, 2, 16)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2018, 2, 17)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 18)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 19)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 20)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 25)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2018, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2018, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2018, 9, 3)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2019, + vec![ + ( + NaiveDate::from_ymd_res(2019, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 4)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2019, 2, 5)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2019, 2, 6)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 7)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 8)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 9)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 14)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2019, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2019, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2019, 4, 15)?, + "Hung Kings Commemoration Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2020, + vec![ + ( + NaiveDate::from_ymd_res(2020, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 24)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2020, 1, 25)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2020, 1, 26)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 27)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 28)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 29)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 2)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2020, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2020, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2021, + vec![ + ( + NaiveDate::from_ymd_res(2021, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 11)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2021, 2, 13)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 14)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 16)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 21)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2021, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2021, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2022, + vec![ + ( + NaiveDate::from_ymd_res(2022, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 31)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2022, 2, 1)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2022, 2, 2)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 3)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 4)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 5)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 10)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2022, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 3)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 11)?, + "Hung Kings Commemoration Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2023, + vec![ + ( + NaiveDate::from_ymd_res(2023, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 21)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2023, 1, 22)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2023, 1, 23)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 24)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 25)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 26)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 29)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2023, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 2)?, + "Hung Kings Commemoration Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 5, 3)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 9, 4)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2024, + vec![ + ( + NaiveDate::from_ymd_res(2024, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 9)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2024, 2, 10)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2024, 2, 11)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 12)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 13)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 14)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 18)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2024, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2024, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2025, + vec![ + ( + NaiveDate::from_ymd_res(2025, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 28)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2025, 1, 29)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2025, 1, 30)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 31)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 1)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 2)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 7)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2025, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2025, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2026, + vec![ + ( + NaiveDate::from_ymd_res(2026, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2026, 2, 17)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2026, 2, 18)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 19)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 20)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 21)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 26)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2026, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2026, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2026, 4, 27)?, + "Hung Kings Commemoration Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2027, + vec![ + ( + NaiveDate::from_ymd_res(2027, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 5)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2027, 2, 6)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2027, 2, 7)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 8)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 9)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 10)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 16)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2027, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2027, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 5, 3)?, + "International Labor Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2028, + vec![ + ( + NaiveDate::from_ymd_res(2028, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 25)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2028, 1, 26)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2028, 1, 27)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 28)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 29)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 30)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 4)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2028, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 3)?, + "International New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 5, 2)?, + "Liberation Day/Reunification Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 9, 4)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2029, + vec![ + ( + NaiveDate::from_ymd_res(2029, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 12)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2029, 2, 14)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 16)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 17)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 23)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2029, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2029, 9, 2)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2029, 9, 3)?, + "Independence Day (observed)", + ), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + build_year( + years, + 2030, + vec![ + ( + NaiveDate::from_ymd_res(2030, 1, 1)?, + "International New Year's Day", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 2)?, + "Vietnamese New Year's Eve", + ), + (NaiveDate::from_ymd_res(2030, 2, 3)?, "Vietnamese New Year"), + ( + NaiveDate::from_ymd_res(2030, 2, 4)?, + "The second day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 5)?, + "The third day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 6)?, + "The forth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 7)?, + "The fifth day of Tet Holiday", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 12)?, + "Hung Kings Commemoration Day", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 30)?, + "Liberation Day/Reunification Day", + ), + ( + NaiveDate::from_ymd_res(2030, 5, 1)?, + "International Labor Day", + ), + (NaiveDate::from_ymd_res(2030, 9, 2)?, "Independence Day"), + ], + &mut map, + Country::VN, + "Vietnam", + ); + + Ok(map) +} diff --git a/src/data/za.rs b/src/data/za.rs new file mode 100644 index 0000000..5fbc940 --- /dev/null +++ b/src/data/za.rs @@ -0,0 +1,1003 @@ +//! South Africa +use super::*; + +/// Generate holiday map for South Africa. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2000, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2000, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2000, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2000, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2000, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2000, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2000, 9, 25)?, + "Heritage Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 1, 2)?, "Y2K changeover"), + ( + NaiveDate::from_ymd_res(2000, 1, 3)?, + "Y2K changeover (observed)", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 16)?, + "Day of Reconciliation", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 17)?, + "Day of Reconciliation (observed)", + ), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2001, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2001, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2001, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2001, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2001, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2002, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2002, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2002, 6, 16)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2002, 6, 17)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2002, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2003, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2003, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2003, 4, 27)?, "Freedom Day"), + ( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2003, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2003, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2003, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Day of Goodwill"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Day of Goodwill (observed)", + ), + (NaiveDate::from_ymd_res(2004, 3, 21)?, "Human Rights Day"), + ( + NaiveDate::from_ymd_res(2004, 3, 22)?, + "Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2004, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2004, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2004, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2004, 4, 14)?, + "National and provincial government elections", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2005, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2005, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2005, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2005, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2006, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2006, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2006, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2006, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2006, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2006, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2006, 9, 25)?, + "Heritage Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 1)?, + "Local government elections", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2007, 12, 16)?, + "Day of Reconciliation", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 17)?, + "Day of Reconciliation (observed)", + ), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2007, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2007, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2007, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2007, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2007, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2008, 3, 21)?, + "Good Friday; Human Rights Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2008, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2008, 4, 27)?, "Freedom Day"), + ( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2008, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2008, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2008, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2008, 5, 2)?, + "Public holiday by presidential decree", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2009, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2009, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2009, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2009, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2009, 8, 9)?, "National Women's Day"), + ( + NaiveDate::from_ymd_res(2009, 8, 10)?, + "National Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2009, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2009, 4, 22)?, + "National and provincial government elections", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Day of Goodwill"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Day of Goodwill (observed)", + ), + (NaiveDate::from_ymd_res(2010, 3, 21)?, "Human Rights Day"), + ( + NaiveDate::from_ymd_res(2010, 3, 22)?, + "Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2010, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2010, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2010, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2011, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2011, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2011, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2011, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 18)?, + "Local government elections", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Public holiday by presidential decree", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2012, 12, 16)?, + "Day of Reconciliation", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 17)?, + "Day of Reconciliation (observed)", + ), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2012, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2012, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2012, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2012, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2012, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2013, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2013, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2013, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2013, 6, 16)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2013, 6, 17)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2013, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2013, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2014, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2014, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2014, 4, 27)?, "Freedom Day"), + ( + NaiveDate::from_ymd_res(2014, 4, 28)?, + "Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2014, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2014, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2014, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2014, 5, 7)?, + "National and provincial government elections", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2015, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2015, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2015, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2015, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2015, 8, 9)?, "National Women's Day"), + ( + NaiveDate::from_ymd_res(2015, 8, 10)?, + "National Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2016, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2016, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2016, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2016, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2016, 8, 3)?, + "Local government elections", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Public holiday by presidential decree", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2017, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2017, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2017, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2017, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2017, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2017, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2017, 9, 25)?, + "Heritage Day (observed)", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2018, 12, 16)?, + "Day of Reconciliation", + ), + ( + NaiveDate::from_ymd_res(2018, 12, 17)?, + "Day of Reconciliation (observed)", + ), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2018, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2018, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2018, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2018, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2018, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2019, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2019, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2019, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2019, 6, 16)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2019, 6, 17)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2019, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2019, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2019, 5, 8)?, + "National and provincial government elections", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2020, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2020, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2020, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2020, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2020, 8, 9)?, "National Women's Day"), + ( + NaiveDate::from_ymd_res(2020, 8, 10)?, + "National Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Day of Goodwill"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Day of Goodwill (observed)", + ), + (NaiveDate::from_ymd_res(2021, 3, 21)?, "Human Rights Day"), + ( + NaiveDate::from_ymd_res(2021, 3, 22)?, + "Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2021, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2021, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2021, 9, 24)?, "Heritage Day"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Municipal elections"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2022, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2022, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2022, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2022, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Public holiday by presidential decree", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2023, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2023, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2023, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2023, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2023, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2023, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2023, 9, 25)?, + "Heritage Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 15)?, + "Public holiday by presidential decree", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2024, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2024, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2024, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2024, 6, 16)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2024, 6, 17)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2024, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2024, 5, 29)?, + "National and provincial government elections", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2025, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2025, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2025, 4, 27)?, "Freedom Day"), + ( + NaiveDate::from_ymd_res(2025, 4, 28)?, + "Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2025, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2025, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2025, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2026, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2026, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2026, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2026, 8, 9)?, "National Women's Day"), + ( + NaiveDate::from_ymd_res(2026, 8, 10)?, + "National Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Day of Goodwill"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Day of Goodwill (observed)", + ), + (NaiveDate::from_ymd_res(2027, 3, 21)?, "Human Rights Day"), + ( + NaiveDate::from_ymd_res(2027, 3, 22)?, + "Human Rights Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2027, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2027, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2027, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2028, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2028, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2028, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2028, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2028, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2028, 9, 24)?, "Heritage Day"), + ( + NaiveDate::from_ymd_res(2028, 9, 25)?, + "Heritage Day (observed)", + ), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2029, 12, 16)?, + "Day of Reconciliation", + ), + ( + NaiveDate::from_ymd_res(2029, 12, 17)?, + "Day of Reconciliation (observed)", + ), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2029, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2029, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2029, 6, 16)?, "Youth Day"), + (NaiveDate::from_ymd_res(2029, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2029, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Family Day"), + ( + NaiveDate::from_ymd_res(2030, 12, 16)?, + "Day of Reconciliation", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Day of Goodwill"), + (NaiveDate::from_ymd_res(2030, 3, 21)?, "Human Rights Day"), + (NaiveDate::from_ymd_res(2030, 4, 27)?, "Freedom Day"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2030, 6, 16)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2030, 6, 17)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 8, 9)?, "National Women's Day"), + (NaiveDate::from_ymd_res(2030, 9, 24)?, "Heritage Day"), + ], + &mut map, + Country::ZA, + "South Africa", + ); + + Ok(map) +} diff --git a/src/data/zm.rs b/src/data/zm.rs new file mode 100644 index 0000000..b001245 --- /dev/null +++ b/src/data/zm.rs @@ -0,0 +1,1061 @@ +//! Zambia +use super::*; + +/// Generate holiday map for Zambia. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2000, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2000, 3, 12)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2000, 3, 13)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 22)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2000, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2000, 7, 3)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2000, 7, 4)?, "Unity Day"), + (NaiveDate::from_ymd_res(2000, 8, 7)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2000, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2001, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2001, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2001, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2001, 7, 2)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2001, 7, 3)?, "Unity Day"), + (NaiveDate::from_ymd_res(2001, 8, 6)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2001, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2002, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2002, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 3, 30)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2002, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2002, 7, 1)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2002, 7, 2)?, "Unity Day"), + (NaiveDate::from_ymd_res(2002, 8, 5)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2002, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2003, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2003, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 19)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2003, 5, 25)?, "Africa Freedom Day"), + ( + NaiveDate::from_ymd_res(2003, 5, 26)?, + "Africa Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2003, 7, 7)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2003, 7, 8)?, "Unity Day"), + (NaiveDate::from_ymd_res(2003, 8, 4)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2003, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2004, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2004, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2004, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2004, 7, 5)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2004, 7, 6)?, "Unity Day"), + (NaiveDate::from_ymd_res(2004, 8, 2)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2004, 10, 24)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 10, 25)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2005, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2005, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 26)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2005, 7, 4)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2005, 7, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2005, 8, 1)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2005, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2006, 3, 12)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2006, 3, 13)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 15)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2006, 7, 3)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2006, 7, 4)?, "Unity Day"), + (NaiveDate::from_ymd_res(2006, 8, 7)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2006, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2007, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2007, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2007, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2007, 7, 2)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2007, 7, 3)?, "Unity Day"), + (NaiveDate::from_ymd_res(2007, 8, 6)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2007, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2008, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2008, 5, 25)?, "Africa Freedom Day"), + ( + NaiveDate::from_ymd_res(2008, 5, 26)?, + "Africa Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2008, 7, 7)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2008, 7, 8)?, "Unity Day"), + (NaiveDate::from_ymd_res(2008, 8, 4)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2008, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2009, 3, 8)?, + "International Women's Day", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 9)?, + "International Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2009, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 11)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2009, 7, 6)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2009, 7, 7)?, "Unity Day"), + (NaiveDate::from_ymd_res(2009, 8, 3)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2009, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2010, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2010, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2010, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2010, 7, 5)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2010, 7, 6)?, "Unity Day"), + (NaiveDate::from_ymd_res(2010, 8, 2)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2010, 10, 24)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 10, 25)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2011, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2011, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2011, 7, 4)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2011, 7, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2011, 8, 1)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2011, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 26)?, + "Christmas Day (observed)", + ), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2012, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 7)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2012, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2012, 7, 2)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2012, 7, 3)?, "Unity Day"), + (NaiveDate::from_ymd_res(2012, 8, 6)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2012, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2013, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2013, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 3, 30)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2013, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2013, 7, 1)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2013, 7, 2)?, "Unity Day"), + (NaiveDate::from_ymd_res(2013, 8, 5)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2013, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2014, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2014, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2014, 5, 25)?, "Africa Freedom Day"), + ( + NaiveDate::from_ymd_res(2014, 5, 26)?, + "Africa Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2014, 7, 7)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2014, 7, 8)?, "Unity Day"), + (NaiveDate::from_ymd_res(2014, 8, 4)?, "Farmers' Day"), + (NaiveDate::from_ymd_res(2014, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2015, 3, 8)?, + "International Women's Day", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 9)?, + "International Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 4)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2015, 7, 6)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2015, 7, 7)?, "Unity Day"), + (NaiveDate::from_ymd_res(2015, 8, 3)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2015, 10, 18)?, + "National Prayer Day", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 19)?, + "National Prayer Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2016, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2016, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 26)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2016, 7, 4)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2016, 7, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2016, 8, 1)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2016, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 11)?, + "General elections and referendum", + ), + ( + NaiveDate::from_ymd_res(2016, 9, 13)?, + "Inauguration ceremony of President-elect and Vice President-elect", + ), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2017, 3, 12)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2017, 3, 13)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2017, 7, 3)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2017, 7, 4)?, "Unity Day"), + (NaiveDate::from_ymd_res(2017, 8, 7)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2017, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2018, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2018, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2018, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2018, 7, 2)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2018, 7, 3)?, "Unity Day"), + (NaiveDate::from_ymd_res(2018, 8, 6)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2018, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2018, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 3, 9)?, "Public holiday"), + ( + NaiveDate::from_ymd_res(2018, 7, 26)?, + "Lusaka mayoral and other local government elections", + ), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2019, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 20)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2019, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2019, 7, 1)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2019, 7, 2)?, "Unity Day"), + (NaiveDate::from_ymd_res(2019, 8, 5)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2019, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2020, 3, 8)?, + "International Women's Day", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 9)?, + "International Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 11)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2020, 7, 6)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2020, 7, 7)?, "Unity Day"), + (NaiveDate::from_ymd_res(2020, 8, 3)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 18)?, + "National Prayer Day", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 19)?, + "National Prayer Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2021, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 3)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2021, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2021, 7, 5)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2021, 7, 6)?, "Unity Day"), + (NaiveDate::from_ymd_res(2021, 8, 2)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2021, 10, 24)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 25)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 2)?, + "Memorial service for Kenneth Kaunda", + ), + ( + NaiveDate::from_ymd_res(2021, 7, 7)?, + "Funeral of Kenneth Kaunda", + ), + (NaiveDate::from_ymd_res(2021, 8, 12)?, "General elections"), + ( + NaiveDate::from_ymd_res(2021, 8, 13)?, + "Counting in general elections", + ), + ( + NaiveDate::from_ymd_res(2021, 8, 24)?, + "Presidential inauguration", + ), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2022, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 16)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 4, 28)?, "Kenneth Kaunda Day"), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Labour Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Labour Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2022, 7, 4)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2022, 7, 5)?, "Unity Day"), + (NaiveDate::from_ymd_res(2022, 8, 1)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2022, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 26)?, + "Christmas Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 18)?, + "Funeral of Rupiah Banda", + ), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2023, 3, 12)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2023, 3, 13)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 8)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 4, 28)?, "Kenneth Kaunda Day"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2023, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2023, 7, 3)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2023, 7, 4)?, "Unity Day"), + (NaiveDate::from_ymd_res(2023, 8, 7)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2023, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2024, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 3, 30)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 4, 28)?, "Kenneth Kaunda Day"), + ( + NaiveDate::from_ymd_res(2024, 4, 29)?, + "Kenneth Kaunda Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2024, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2024, 7, 1)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2024, 7, 2)?, "Unity Day"), + (NaiveDate::from_ymd_res(2024, 8, 5)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2024, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2025, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 4, 28)?, "Kenneth Kaunda Day"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2025, 5, 25)?, "Africa Freedom Day"), + ( + NaiveDate::from_ymd_res(2025, 5, 26)?, + "Africa Freedom Day (observed)", + ), + (NaiveDate::from_ymd_res(2025, 7, 7)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2025, 7, 8)?, "Unity Day"), + (NaiveDate::from_ymd_res(2025, 8, 4)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2025, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "International Women's Day", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 9)?, + "International Women's Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 4)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 4, 28)?, "Kenneth Kaunda Day"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2026, 7, 6)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2026, 7, 7)?, "Unity Day"), + (NaiveDate::from_ymd_res(2026, 8, 3)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 18)?, + "National Prayer Day", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 19)?, + "National Prayer Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2027, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 27)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 4, 28)?, "Kenneth Kaunda Day"), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2027, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2027, 7, 5)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2027, 7, 6)?, "Unity Day"), + (NaiveDate::from_ymd_res(2027, 8, 2)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2027, 10, 24)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 25)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2028, 3, 12)?, "Youth Day"), + ( + NaiveDate::from_ymd_res(2028, 3, 13)?, + "Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 4, 28)?, "Kenneth Kaunda Day"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2028, 7, 3)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2028, 7, 4)?, "Unity Day"), + (NaiveDate::from_ymd_res(2028, 8, 7)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2028, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2029, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 4, 28)?, "Kenneth Kaunda Day"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2029, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2029, 7, 2)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2029, 7, 3)?, "Unity Day"), + (NaiveDate::from_ymd_res(2029, 8, 6)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2029, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "International Women's Day", + ), + (NaiveDate::from_ymd_res(2030, 3, 12)?, "Youth Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 20)?, "Holy Saturday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 4, 28)?, "Kenneth Kaunda Day"), + ( + NaiveDate::from_ymd_res(2030, 4, 29)?, + "Kenneth Kaunda Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Labour Day"), + (NaiveDate::from_ymd_res(2030, 5, 25)?, "Africa Freedom Day"), + (NaiveDate::from_ymd_res(2030, 7, 1)?, "Heroes' Day"), + (NaiveDate::from_ymd_res(2030, 7, 2)?, "Unity Day"), + (NaiveDate::from_ymd_res(2030, 8, 5)?, "Farmers' Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 18)?, + "National Prayer Day", + ), + (NaiveDate::from_ymd_res(2030, 10, 24)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + ], + &mut map, + Country::ZM, + "Zambia", + ); + + Ok(map) +} diff --git a/src/data/zw.rs b/src/data/zw.rs new file mode 100644 index 0000000..d3ee811 --- /dev/null +++ b/src/data/zw.rs @@ -0,0 +1,947 @@ +//! Zimbabwe +use super::*; + +/// Generate holiday map for Zimbabwe. +#[allow(unused_mut, unused_variables)] +pub fn build( + years: &Option<&std::ops::Range>, +) -> Result>> { + let mut map = HashMap::new(); + + build_year( + years, + 2000, + vec![ + (NaiveDate::from_ymd_res(2000, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 22)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2000, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2000, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2000, 8, 14)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2000, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2001, + vec![ + (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 14)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2001, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2001, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2001, 8, 13)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2001, 8, 14)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2001, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2002, + vec![ + (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 3, 30)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2002, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2002, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2002, 8, 12)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2002, 8, 13)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2002, 12, 22)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 23)?, + "Unity Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2003, + vec![ + (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2003, 4, 18)?, + "Good Friday; Independence Day", + ), + (NaiveDate::from_ymd_res(2003, 4, 19)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2003, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2003, 5, 26)?, + "Africa Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 11)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2003, 8, 12)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2003, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2004, + vec![ + (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 10)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 4, 18)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2004, 4, 19)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2004, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2004, 8, 9)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2004, 8, 10)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2004, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2005, + vec![ + (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 26)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2005, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2005, 8, 8)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2005, 8, 9)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2005, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2005, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2006, + vec![ + (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 15)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2006, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2006, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2006, 8, 14)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2006, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2007, + vec![ + (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 7)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2007, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2007, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2007, 8, 13)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2007, 8, 14)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2007, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2008, + vec![ + (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2008, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2008, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2008, 5, 26)?, + "Africa Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 11)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2008, 8, 12)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2008, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2009, + vec![ + (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 11)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2009, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2009, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2009, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2009, 8, 10)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2009, 8, 11)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2009, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2010, + vec![ + (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 3)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 4, 18)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2010, 4, 19)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2010, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2010, 8, 9)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2010, 8, 10)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2010, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2011, + vec![ + (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 23)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2011, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2011, 8, 8)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2011, 8, 9)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2011, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2011, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2012, + vec![ + (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 7)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2012, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2012, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2012, 8, 13)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2012, 8, 14)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2012, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2013, + vec![ + (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 3, 30)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2013, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2013, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2013, 8, 12)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2013, 8, 13)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2013, 12, 22)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2013, 12, 23)?, + "Unity Day (observed)", + ), + (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2014, + vec![ + (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2014, 4, 18)?, + "Good Friday; Independence Day", + ), + (NaiveDate::from_ymd_res(2014, 4, 19)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2014, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2014, 5, 26)?, + "Africa Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 11)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2014, 8, 12)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2014, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2015, + vec![ + (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 4)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2015, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2015, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2015, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2015, 8, 10)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2015, 8, 11)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2015, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2016, + vec![ + (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 26)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2016, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2016, 8, 8)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2016, 8, 9)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2016, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2017, + vec![ + (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 2)?, + "New Year's Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 15)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2017, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2017, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2017, 8, 14)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2017, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2018, + vec![ + (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2018, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2018, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2018, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2018, 8, 13)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2018, 8, 14)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2018, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2019, + vec![ + (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2019, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 20)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2019, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2019, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2019, 8, 12)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2019, 8, 13)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2019, 12, 22)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2019, 12, 23)?, + "Unity Day (observed)", + ), + (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2020, + vec![ + (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2020, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 11)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2020, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2020, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2020, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2020, 8, 10)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2020, 8, 11)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2020, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2021, + vec![ + (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2021, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 22)?, + "Robert Gabriel Mugabe National Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 3)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 4, 18)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2021, 4, 19)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2021, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2021, 8, 9)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2021, 8, 10)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2021, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2022, + vec![ + (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2022, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 16)?, "Easter Saturday"), + ( + NaiveDate::from_ymd_res(2022, 4, 18)?, + "Easter Monday; Independence Day", + ), + (NaiveDate::from_ymd_res(2022, 5, 1)?, "Workers' Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 2)?, + "Workers' Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2022, 8, 8)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2022, 8, 9)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2022, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Christmas Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2023, + vec![ + (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 2)?, + "New Year's Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 8)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2023, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2023, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2023, 8, 14)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2023, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2024, + vec![ + (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2024, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 3, 30)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2024, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2024, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2024, 8, 12)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2024, 8, 13)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2024, 12, 22)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2024, 12, 23)?, + "Unity Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2025, + vec![ + (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2025, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 18)?, + "Good Friday; Independence Day", + ), + (NaiveDate::from_ymd_res(2025, 4, 19)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2025, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2025, 5, 26)?, + "Africa Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 11)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2025, 8, 12)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2025, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2026, + vec![ + (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2026, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 4)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2026, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2026, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2026, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2026, 8, 10)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2026, 8, 11)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2026, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2027, + vec![ + (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2027, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 22)?, + "Robert Gabriel Mugabe National Youth Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 27)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 4, 18)?, "Independence Day"), + ( + NaiveDate::from_ymd_res(2027, 4, 19)?, + "Independence Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2027, 5, 25)?, "Africa Day"), + (NaiveDate::from_ymd_res(2027, 8, 9)?, "Zimbabwe Heroes' Day"), + (NaiveDate::from_ymd_res(2027, 8, 10)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2027, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Boxing Day (observed)", + ), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2028, + vec![ + (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2028, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 15)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2028, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2028, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2028, 8, 14)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2028, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2029, + vec![ + (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2029, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2029, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2029, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2029, 8, 13)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2029, 8, 14)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2029, 12, 22)?, "Unity Day"), + (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + build_year( + years, + 2030, + vec![ + (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), + ( + NaiveDate::from_ymd_res(2030, 2, 21)?, + "Robert Gabriel Mugabe National Youth Day", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 20)?, "Easter Saturday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Independence Day"), + (NaiveDate::from_ymd_res(2030, 5, 1)?, "Workers' Day"), + (NaiveDate::from_ymd_res(2030, 5, 25)?, "Africa Day"), + ( + NaiveDate::from_ymd_res(2030, 8, 12)?, + "Zimbabwe Heroes' Day", + ), + (NaiveDate::from_ymd_res(2030, 8, 13)?, "Defense Forces Day"), + (NaiveDate::from_ymd_res(2030, 12, 22)?, "Unity Day"), + ( + NaiveDate::from_ymd_res(2030, 12, 23)?, + "Unity Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), + (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), + ], + &mut map, + Country::ZW, + "Zimbabwe", + ); + + Ok(map) +} diff --git a/src/iter.rs b/src/iter.rs new file mode 100644 index 0000000..2ac1023 --- /dev/null +++ b/src/iter.rs @@ -0,0 +1,58 @@ +use chrono::{Datelike, NaiveDate}; +use once_cell::sync::Lazy; + +use crate::{prelude::*, Error, Holiday, Result, DATA}; +use std::collections::VecDeque; + +#[derive(Debug)] +pub struct Iter { + since: NaiveDate, + until: NaiveDate, + buf: VecDeque, +} + +impl std::iter::Iterator for Iter { + type Item = Holiday; + + fn next(&mut self) -> Option { + let next = self.buf.pop_front()?; + + if next.date < self.since { + return self.next(); + } + + if next.date < self.until { + Some(next) + } else { + None + } + } +} + +/// Iterate holidays by dates. +#[allow(dead_code)] +pub fn iter(country: Country, since: NaiveDate, until: NaiveDate) -> Result { + let Some(data) = Lazy::get(&DATA) else { + return Err(Error::Uninitialized); + }; + + let mut buf = VecDeque::new(); + + let mut y = since.year(); + while y <= until.year() { + let data = data.read().map_err(|e| Error::LockError(e.to_string()))?; + let Some(map) = data.get(&country) else { + return Err(Error::CountryNotAvailable); + }; + + let Some(map) = map.get(&y) else { + break; + }; + + buf.extend(map.values().cloned()); + + y += 1; + } + + Ok(Iter { since, until, buf }) +} diff --git a/src/lib.rs b/src/lib.rs index 00def0d..4eaeb3e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,13 +1,22 @@ +mod build; +mod builder; +mod country; +mod data; +mod iter; +mod prelude; + +pub use prelude::*; + use chrono::{Datelike, NaiveDate}; use once_cell::sync::Lazy; use std::{ - collections::{BTreeMap, HashMap, HashSet, VecDeque}, - ops::Range, + collections::{BTreeMap, HashMap}, sync::RwLock, }; /// Type alias for Holiday map. -pub type HolidayMap = HashMap>>; +pub type HolidayPerCountryMap = HashMap>; +pub type HolidayMap = HashMap; /// Type alias for Year. pub type Year = i32; @@ -30,7 +39,9 @@ pub fn init() -> Result<()> { /// not available, it will return `Err(Error)`. If the specified date is not a holiday, it /// will return `Ok(None)`. Otherwise, it will return `Ok(Some(Holiday))`. pub fn get(country: Country, date: NaiveDate) -> Result> { - let Some(data) = Lazy::get(&DATA) else { return Err(Error::Uninitialized); }; + let Some(data) = Lazy::get(&DATA) else { + return Err(Error::Uninitialized); + }; let data = data.read().map_err(|e| Error::LockError(e.to_string()))?; let Some(map) = data.get(&country) else { @@ -48,7 +59,9 @@ pub fn get(country: Country, date: NaiveDate) -> Result> { /// not available, it will return `Err(Error)`. If the date is not a holiday, it /// will return `Ok(false)`. Otherwise, it will return `Ok(true)`. pub fn contains(country: Country, date: NaiveDate) -> Result { - let Some(data) = Lazy::get(&DATA) else { return Err(Error::Uninitialized); }; + let Some(data) = Lazy::get(&DATA) else { + return Err(Error::Uninitialized); + }; let data = data.read().map_err(|e| Error::LockError(e.to_string()))?; let Some(map) = data.get(&country) else { @@ -62,94 +75,6 @@ pub fn contains(country: Country, date: NaiveDate) -> Result { Ok(map.get(&date).is_some()) } -#[derive(Debug)] -pub struct Iter { - since: NaiveDate, - until: NaiveDate, - buf: VecDeque, -} - -impl std::iter::Iterator for Iter { - type Item = Holiday; - - fn next(&mut self) -> Option { - let next = self.buf.pop_front()?; - - if next.date < self.since { - return self.next(); - } - - if next.date < self.until { - Some(next) - } else { - None - } - } -} - -/// Iterate holidays by dates. -pub fn iter(country: Country, since: NaiveDate, until: NaiveDate) -> Result { - let Some(data) = Lazy::get(&DATA) else { return Err(Error::Uninitialized); }; - - let mut buf = VecDeque::new(); - - let mut y = since.year(); - while y <= until.year() { - let data = data.read().map_err(|e| Error::LockError(e.to_string()))?; - let Some(map) = data.get(&country) else { - return Err(Error::CountryNotAvailable); - }; - - let Some(map) = map.get(&y) else { - break; - }; - - buf.extend(map.values().cloned()); - - y += 1; - } - - Ok(Iter { since, until, buf }) -} - -/// Holiday database builder. -#[derive(Default)] -pub struct Builder { - countries: Option>, - years: Option>, -} - -impl Builder { - pub fn new() -> Self { - Self::default() - } - - /// Specify ISO 3166-1 alpha-2 country codes to load. - pub fn countries(mut self, countries: &[Country]) -> Self { - self.countries = Some(countries.iter().copied().collect()); - self - } - - /// Specify range of years to load. - pub fn years(mut self, years: Range) -> Self { - self.years = Some(years); - self - } - - /// Build and get holiday database. - pub fn build(self) -> Result { - let Builder { countries, years } = self; - build(countries.as_ref(), years.as_ref()) - } - - /// Build and initialize holiday database. - pub fn init(self) -> Result<()> { - let Builder { countries, years } = self; - let map = build(countries.as_ref(), years.as_ref())?; - init_holiday(map) - } -} - /// Represents a holiday. #[derive(Debug, Clone)] pub struct Holiday { @@ -219,5 +144,3 @@ pub trait NaiveDateExt { } impl NaiveDateExt for NaiveDate {} - -include!("data.rs"); diff --git a/src/prelude.rs b/src/prelude.rs new file mode 100644 index 0000000..a5b3e62 --- /dev/null +++ b/src/prelude.rs @@ -0,0 +1 @@ +pub use crate::{builder::Builder, country::Country, data::*, iter::iter};